Code Duplication    Length = 13-13 lines in 2 locations

src/ServiceBundle/Tests/Expectation/ToPingExpectationTest.php 1 location

@@ 61-73 (lines=13) @@
58
        $this->expectation->run('8.8.8.8');
59
    }
60
    
61
    private function createSocketMocks()
62
    {
63
        foreach ([
64
            'socket_create',
65
            'socket_set_option',
66
            'socket_connect',
67
            'socket_send',
68
            'socket_close'
69
        ] as $func) {
70
            $mock = $this->getFunctionMock('Overwatch\ServiceBundle\Expectation', $func);
71
            $mock->expects($this->once())->willReturn(true);
72
        }
73
    }
74
    
75
    private function createSocketReadMock($type = 'normal')
76
    {

src/TestBundle/Tests/Command/TestsRunCommandTest.php 1 location

@@ 194-206 (lines=13) @@
191
        $this->assertRecentResultsPersisted();
192
    }
193
    
194
    private function createSocketMocks()
195
    {
196
        foreach ([
197
            'socket_create',
198
            'socket_set_option',
199
            'socket_connect',
200
            'socket_send',
201
            'socket_close'
202
        ] as $func) {
203
            $mock = $this->getFunctionMock('Overwatch\ServiceBundle\Expectation', $func);
204
            $mock->expects($this->any())->willReturn(true);
205
        }
206
    }
207
    
208
    private function createSocketReadMock()
209
    {