1--TEST-- 2Tests that internal iterator's rewind function is called once 3--EXTENSIONS-- 4zend_test 5--FILE-- 6<?php 7 8$subject = new \ZendTest\Iterators\TraversableTest(); 9$it = $subject->getIterator(); 10var_dump($it); 11foreach ($it as $key => $value) { 12 echo "{$key} => {$value}\n"; 13} 14?> 15--EXPECT-- 16object(InternalIterator)#3 (0) { 17} 18TraversableTest::rewind 19TraversableTest::valid 20TraversableTest::current 21TraversableTest::key 220 => 0 23TraversableTest::next 24TraversableTest::valid 25TraversableTest::current 26TraversableTest::key 271 => 1 28TraversableTest::next 29TraversableTest::valid 30TraversableTest::current 31TraversableTest::key 322 => 2 33TraversableTest::next 34TraversableTest::valid 35TraversableTest::current 36TraversableTest::key 373 => 3 38TraversableTest::next 39TraversableTest::valid 40TraversableTest::drop 41