Incompatible with RecursiveIterator

#4517

http://php.net/manual/en/recursiveiterator.haschildren.php
> Returns TRUE if the current entry can be iterated over, otherwise returns FALSE. 
@malukenho 
This foreach do recursive iteration and gathers up logs of recursive iteration behavior.
These asserted in the line  [$this->assertEquals($expected, $actual);]