芝麻web文件管理V1.00
编辑当前文件:/home/qrafawbu/rentandbuyrealty.com/pay/vendor/hoa/iterator/Test/Unit/Mock.php
given($iterator = new LUT\Mock()) ->when($result = iterator_to_array($iterator)) ->then ->array($result) ->isEmpty(); } public function case_recursive_mock_mock() { $this ->when($iterator = new LUT\Recursive\Mock(new LUT\Mock())) ->then ->variable($iterator->getChildren()) ->isNull() ->boolean($iterator->hasChildren()) ->isFalse(); } public function case_recursive() { $this ->given( $map = new LUT\Map(['a', 'b', 'c']), $mock = new LUT\Recursive\Mock($map), $iteratoriterator = new LUT\Recursive\Iterator($mock) ) ->when($result = iterator_to_array($map, false)) ->then ->array($result) ->isEqualTo(['a', 'b', 'c']); } }