4 * This file is part of the Symfony package.
6 * (c) Fabien Potencier <fabien@symfony.com>
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
12 namespace Symfony\Component\Finder\Tests\Iterator;
14 use Symfony\Component\Finder\Iterator\ExcludeDirectoryFilterIterator;
15 use Symfony\Component\Finder\Iterator\RecursiveDirectoryIterator;
17 class ExcludeDirectoryFilterIteratorTest extends RealIteratorTestCase
20 * @dataProvider getAcceptData
22 public function testAccept($directories, $expected)
24 $inner = new \RecursiveIteratorIterator(new RecursiveDirectoryIterator($this->toAbsolute(), \FilesystemIterator::SKIP_DOTS), \RecursiveIteratorIterator::SELF_FIRST);
26 $iterator = new ExcludeDirectoryFilterIterator($inner, $directories);
28 $this->assertIterator($expected, $iterator);
31 public function getAcceptData()
75 array(array('foo'), $this->toAbsolute($foo)),
76 array(array('fo'), $this->toAbsolute($fo)),
77 array(array('toto/'), $this->toAbsolute($toto)),