public function testListenOverTimeout() { $this->object->sendAsync(new Request('/queue simple listen', null, 'l'), function ($response) { PHPUnit_Framework_Assert::assertFalse($response); }); $this->assertSame(1, $this->object->getPendingRequestsCount()); $this->assertTrue($this->object->loop(ini_get('default_socket_timeout') + 3)); $this->assertSame(1, $this->object->getPendingRequestsCount()); $this->assertSame(array(), $this->object->extractNewResponses('l')->toArray()); }