| Conditions | 1 |
| Paths | 1 |
| Total Lines | 17 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 12 | public function testCount() |
||
| 13 | { |
||
| 14 | $iterator = new \ArrayIterator([ |
||
| 15 | [ |
||
| 16 | 'id' => 1, |
||
| 17 | 'username' => 'john.doe', |
||
| 18 | 'name' => 'John Doe', |
||
| 19 | ], |
||
| 20 | ]); |
||
| 21 | |||
| 22 | $reader = new CountableIteratorReader($iterator); |
||
| 23 | |||
| 24 | // We need to rewind the iterator |
||
| 25 | $reader->rewind(); |
||
| 26 | |||
| 27 | $this->assertEquals(1, $reader->count()); |
||
| 28 | } |
||
| 29 | |||
| 45 |