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

31 lines
794 B
PHP
Raw Normal View History

2010-04-21 08:31:18 +01:00
<?php
/*
2010-04-25 16:06:54 +01:00
* This file is part of the Symfony package.
2010-04-21 08:31:18 +01:00
*
* (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);
}
}