Jyxo\Spl\MapIteratorTest::testIterator PHP Method

testIterator() public method

Tests the whole class.
public testIterator ( )
    public function testIterator()
    {
        require_once DIR_FILES . '/spl/Foo2.php';
        require_once DIR_FILES . '/spl/Foo3.php';
        $data = range(0, 10);
        $callback = function ($value) {
            return $value * $value;
        };
        $this->runMapTest($data, $data, $callback);
        $this->runMapTest($data, new \ArrayIterator($data), $callback);
        $this->runMapTest($data, new \Foo2($data), $callback);
        $this->runMapTest($data, new \Foo3($data), $callback);
    }