Code Duplication    Length = 16-16 lines in 3 locations

Tests/Transport/Rpc/RpcClientOld.php 1 location

@@ 114-129 (lines=16) @@
111
    /**
112
     * @return CmobiAMQPChannel
113
     */
114
    protected function getChannelMock()
115
    {
116
        $channelMock = $this->getMockBuilder(CmobiAMQPChannel::class)
117
            ->disableOriginalConstructor()
118
            ->getMock();
119
        $channelMock
120
            ->expects($this->any())
121
            ->method('basic_publish')
122
            ->willReturn(true);
123
        $channelMock
124
            ->method('basicConsume')
125
            ->willReturn(true);
126
127
        return $channelMock;
128
    }
129
130
    /**
131
     * @param string $msg
132
     * @param null   $correlationId

Tests/Transport/Subscriber/PublisherTest.php 1 location

@@ 100-115 (lines=16) @@
97
    /**
98
     * @return CmobiAMQPChannel
99
     */
100
    protected function getChannelMock()
101
    {
102
        $channelMock = $this->getMockBuilder(CmobiAMQPChannel::class)
103
            ->disableOriginalConstructor()
104
            ->getMock();
105
        $channelMock
106
            ->expects($this->any())
107
            ->method('basic_publish')
108
            ->willReturn(true);
109
        $channelMock
110
            ->method('basicConsume')
111
            ->willReturn(true);
112
113
        return $channelMock;
114
    }
115
116
    /**
117
     * @param string $msg
118
     * @param null   $correlationId

Tests/Transport/Worker/TaskTest.php 1 location

@@ 63-78 (lines=16) @@
60
    /**
61
     * @return CmobiAMQPChannel
62
     */
63
    protected function getChannelMock()
64
    {
65
        $channelMock = $this->getMockBuilder(CmobiAMQPChannel::class)
66
            ->disableOriginalConstructor()
67
            ->getMock();
68
        $channelMock
69
            ->expects($this->any())
70
            ->method('basic_publish')
71
            ->willReturn(true);
72
        $channelMock
73
            ->method('basicConsume')
74
            ->willReturn(true);
75
76
        return $channelMock;
77
    }
78
79
    /**
80
     * @param string $msg
81
     * @param null   $correlationId