3 declare(strict_types=1);
24 $expected_iterator_values = [
'entry0',
'entry1',
'entry2'];
25 $expected_iterator_keys = [
'key0',
'key1',
'key2'];
27 for (
$i = 0, $i_max = 3;
$i < $i_max;
$i++) {
28 $this->assertTrue($iterator->valid());
30 $expected_iterator_values[
$i],
34 $expected_iterator_keys[$i],
41 $this->assertFalse($iterator->valid());
52 $this->assertFalse($iterator->valid());
53 $this->assertNull($iterator->current());
54 $this->assertNull($iterator->key());
67 $this->assertTrue($iterator->valid());
78 $this->assertFalse($iterator->valid());
85 $this->assertFalse($iterator->valid());
86 $this->assertNull($iterator->current());
87 $this->assertNull($iterator->key());
Class ilCtrlArrayIteratorTest.
testArrayIteratorWithCommonStringArray()
testArrayIteratorWithEmptyArray()
Class ilCtrlArrayIterator.
testArrayIteratorWithAssociativeStringArray()
testArrayIteratorWithMixedArray()