Exemplo n.º 1
0
 /**
  * @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());
 }
Exemplo n.º 2
0
 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());
 }