/** * @test */ public function readAll() { $this->_serverStream->writeLine($this->_testString); $this->_clientStream->setTimeout(1); $result = $this->_clientStream->readAll(); $this->assertEquals($this->_serverStream->getWriteBytes(), $this->_clientStream->getReadBytes()); $this->assertInternalType('string', $result); $this->assertEquals($this->_testString . "\n", $result); }