19 declare(strict_types=1);
38 $expected_iterator_values = [
'entry0',
'entry1',
'entry2'];
39 $expected_iterator_keys = [
'key0',
'key1',
'key2'];
41 for ($i = 0, $i_max = 3; $i < $i_max; $i++) {
42 $this->assertTrue($iterator->valid());
44 $expected_iterator_values[$i],
48 $expected_iterator_keys[$i],
55 $this->assertFalse($iterator->valid());
66 $this->assertFalse($iterator->valid());
67 $this->assertNull($iterator->current());
68 $this->assertNull($iterator->key());
81 $this->assertTrue($iterator->valid());
92 $this->assertFalse($iterator->valid());
99 $this->assertFalse($iterator->valid());
100 $this->assertNull($iterator->current());
101 $this->assertNull($iterator->key());
Class ilCtrlArrayIteratorTest.
testArrayIteratorWithCommonStringArray()
testArrayIteratorWithEmptyArray()
Class ilCtrlArrayIterator.
testArrayIteratorWithAssociativeStringArray()
testArrayIteratorWithMixedArray()