Conditions | 1 |
Paths | 1 |
Total Lines | 10 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
29 | public function testWrite($data) |
||
30 | { |
||
31 | $stream = fopen('php://memory', 'r+'); |
||
32 | $buffer = Buffer::factory($stream); |
||
|
|||
33 | $writer = new ByteCodeWriter($buffer); |
||
34 | $writer->append($data); |
||
35 | $writer->flush(); |
||
36 | $buffer->rewind(); |
||
37 | $reader = new ByteCodeReader($buffer); |
||
38 | $this->assertSame($data, trim($reader->read(strlen($data)))); |
||
39 | } |
||
40 | } |