public function testRecursiveIteration() {
$asset1 = $this
->getMock('Assetic\\Asset\\AssetInterface');
$asset2 = $this
->getMock('Assetic\\Asset\\AssetInterface');
$asset3 = $this
->getMock('Assetic\\Asset\\AssetInterface');
$asset4 = $this
->getMock('Assetic\\Asset\\AssetInterface');
$coll3 = new AssetCollection(array(
$asset1,
$asset2,
));
$coll2 = new AssetCollection(array(
$asset3,
$coll3,
));
$coll1 = new AssetCollection(array(
$asset4,
$coll2,
));
$i = 0;
foreach ($coll1 as $a) {
$i++;
}
$this
->assertEquals(4, $i, 'iteration with a recursive iterator is recursive');
}