/** * @dataProvider getDataForTestOutput */ public function testOutput($hex, $expected, $count) { $out = new StringOutputStream(); $stream = new WashOutputStream($out); $this->assertEquals($count, $this->output->invoke($stream, $hex)); $this->assertEquals($expected, $out->__toString()); }
public function testMiscMethods() { $stream = new StringOutputStream(); $stream->write('hello'); $this->assertEquals(5, $stream->size()); $this->assertEquals('hello', $stream->__toString()); $this->assertEquals(0, $stream->reset()->size()); }