This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
symfony/tests/Symfony/Tests/Components/Finder/Iterator/ChainIteratorTest.php
2010-04-21 11:11:38 +02:00

31 lines
794 B
PHP

<?php
/*
* This file is part of the symfony package.
*
* (c) Fabien Potencier <fabien.potencier@symfony-project.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Tests\Components\Finder\Iterator;
use Symfony\Components\Finder\Iterator\ChainIterator;
require_once __DIR__.'/IteratorTestCase.php';
class ChainIteratorTest extends IteratorTestCase
{
public function testAccept()
{
$inner1 = new Iterator(array('test.php', 'test.py'));
$inner2 = new Iterator(array());
$inner3 = new Iterator(array('foo.php'));
$iterator = new ChainIterator(array($inner1, $inner2, $inner3));
$this->assertIterator(array('test.php', 'test.py', 'foo.php'), $iterator);
}
}