| Conditions | 1 |
| Paths | 1 |
| Total Lines | 14 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 12 | public function testZipIterator() |
||
| 13 | { |
||
| 14 | $column1 = new ArrayIterator(array(1, 2, 3, 4)); |
||
| 15 | $column2 = new ArrayIterator(array('a', 'b', 'c')); |
||
| 16 | $column3 = new ArrayIterator(array('A', 'B', 'C')); |
||
| 17 | |||
| 18 | $zipIterator = ZipIterator::newFromArguments($column1, $column2, $column3); |
||
| 19 | |||
| 20 | $zippedValues = iterator_to_array($zipIterator); |
||
| 21 | $this->assertEquals(array(1, 'a', 'A'), $zippedValues[0]); |
||
| 22 | $this->assertEquals(array(2, 'b', 'B'), $zippedValues[1]); |
||
| 23 | $this->assertEquals(array(3, 'c', 'C'), $zippedValues[2]); |
||
| 24 | $this->assertEquals(3, count($zippedValues)); |
||
| 25 | } |
||
| 26 | |||
| 38 |