Code Duplication    Length = 13-13 lines in 3 locations

Tests/Transport/Rpc/RpcClientOld.php 1 location

@@ 136-148 (lines=13) @@
133
     *
134
     * @return CmobiAMQPMessage
135
     */
136
    protected function getCmobiAMQPMessage($msg = '', $correlationId = null)
137
    {
138
        $msgMock = $this->getMockBuilder(CmobiAMQPMessage::class)
139
            ->disableOriginalConstructor()
140
            ->getMock();
141
        $msgMock->method('get')
142
            ->willReturn('correlation_id')
143
            ->willReturn($correlationId);
144
        $msgMock->method('getBody')
145
            ->willReturn($msg);
146
147
        return $msgMock;
148
    }
149
}
150

Tests/Transport/Subscriber/PublisherTest.php 1 location

@@ 122-134 (lines=13) @@
119
     *
120
     * @return CmobiAMQPMessage
121
     */
122
    protected function getCmobiAMQPMessage($msg = '', $correlationId = null)
123
    {
124
        $msgMock = $this->getMockBuilder(CmobiAMQPMessage::class)
125
            ->disableOriginalConstructor()
126
            ->getMock();
127
        $msgMock->method('get')
128
            ->willReturn('correlation_id')
129
            ->willReturn($correlationId);
130
        $msgMock->method('getBody')
131
            ->willReturn($msg);
132
133
        return $msgMock;
134
    }
135
}
136

Tests/Transport/Worker/TaskTest.php 1 location

@@ 85-97 (lines=13) @@
82
     *
83
     * @return CmobiAMQPMessage
84
     */
85
    protected function getCmobiAMQPMessage($msg = '', $correlationId = null)
86
    {
87
        $msgMock = $this->getMockBuilder(CmobiAMQPMessage::class)
88
            ->disableOriginalConstructor()
89
            ->getMock();
90
        $msgMock->method('get')
91
            ->willReturn('correlation_id')
92
            ->willReturn($correlationId);
93
        $msgMock->method('getBody')
94
            ->willReturn($msg);
95
96
        return $msgMock;
97
    }
98
}
99