Total Complexity | 2 |
Total Lines | 19 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
10 | class CachingIteratorTest extends TestCase |
||
11 | { |
||
12 | public function testCachingIterator() |
||
13 | { |
||
14 | $it = new CachingIterator(new ArrayIterator(range(1,5))); |
||
15 | |||
16 | $it[3]; |
||
17 | $this->assertArrayHasKey(3, $it); |
||
18 | $this->assertCount(5, $it); |
||
19 | $arr = iterator_to_array($it); |
||
20 | $this->assertSame([1, 2, 3, 4, 5], $arr); |
||
21 | } |
||
22 | |||
23 | public function testCachingIterator2() |
||
29 | } |
||
30 | } |
||
31 |