use Symfony\Component\Finder\Iterator\ExcludeDirectoryFilterIterator;
use Symfony\Component\Finder\Iterator\RecursiveDirectoryIterator;
class ExcludeDirectoryFilterIteratorTest extends RealIteratorTestCase
{ /**
* @dataProvider getAcceptData
*/
public function testAccept($directories,
$expected) { $inner =
new \
RecursiveIteratorIterator(new RecursiveDirectoryIterator($this->
toAbsolute(), \FilesystemIterator::SKIP_DOTS
), \RecursiveIteratorIterator::SELF_FIRST
);
$iterator =
new ExcludeDirectoryFilterIterator($inner,
$directories);
$this->
assertIterator($expected,
$iterator);
} public static function getAcceptData() { $foo =
[ '.bar',
'.foo',