/** * @memcheck * @dataProvider providerGets * @param string $string * @param string $method * @param array $args * @param string $result * @param string $tail * @group testGets */ public function testGets($string, $method, $args, $result, $tail) { list($socket, $socket2) = Stream::pair(); /* @var Stream $socket */ /* @var Stream $socket2 */ $socket->appendToInput($string); $this->assertEquals(strlen($string), $socket->getSize()); $this->assertEquals($result, call_user_func_array([$socket, $method], $args)); $this->assertEquals(strlen($tail), $socket->getSize()); $this->assertEquals($tail, $socket->getAll()); }