Code Duplication    Length = 14-14 lines in 3 locations

Tests/Transport/Rpc/RpcClientOld.php 1 location

@@ 96-109 (lines=14) @@
93
    /**
94
     * @return CmobiAMQPConnection
95
     */
96
    protected function getConnectionMock()
97
    {
98
        $connectionMock = $this->getMockBuilder(CmobiAMQPConnection::class)
99
            ->disableOriginalConstructor()
100
            ->getMock();
101
        $connectionMock->method('isConnected')
102
            ->willReturn(true);
103
        $connectionMock->method('reconnect')
104
            ->willReturn(true);
105
        $connectionMock->method('channel')
106
            ->willReturn($this->getChannelMock());
107
108
        return $connectionMock;
109
    }
110
111
    /**
112
     * @return CmobiAMQPChannel

Tests/Transport/Subscriber/PublisherTest.php 1 location

@@ 82-95 (lines=14) @@
79
    /**
80
     * @return CmobiAMQPConnection
81
     */
82
    protected function getConnectionMock()
83
    {
84
        $connectionMock = $this->getMockBuilder(CmobiAMQPConnection::class)
85
            ->disableOriginalConstructor()
86
            ->getMock();
87
        $connectionMock->method('isConnected')
88
            ->willReturn(true);
89
        $connectionMock->method('reconnect')
90
            ->willReturn(true);
91
        $connectionMock->method('channel')
92
            ->willReturn($this->getChannelMock());
93
94
        return $connectionMock;
95
    }
96
97
    /**
98
     * @return CmobiAMQPChannel

Tests/Transport/Worker/TaskTest.php 1 location

@@ 45-58 (lines=14) @@
42
    /**
43
     * @return CmobiAMQPConnection
44
     */
45
    protected function getConnectionMock()
46
    {
47
        $connectionMock = $this->getMockBuilder(CmobiAMQPConnection::class)
48
            ->disableOriginalConstructor()
49
            ->getMock();
50
        $connectionMock->method('isConnected')
51
            ->willReturn(true);
52
        $connectionMock->method('reconnect')
53
            ->willReturn(true);
54
        $connectionMock->method('channel')
55
            ->willReturn($this->getChannelMock());
56
57
        return $connectionMock;
58
    }
59
60
    /**
61
     * @return CmobiAMQPChannel