namespace Symfony\Component\Finder\Tests\Iterator;
use Symfony\Component\Finder\Iterator\PathFilterIterator;
class PathFilterIteratorTest extends IteratorTestCase
{ /**
* @dataProvider getTestFilterData
*/
public function testFilter(\Iterator
$inner, array
$matchPatterns, array
$noMatchPatterns, array
$resultArray) { $iterator =
new PathFilterIterator($inner,
$matchPatterns,
$noMatchPatterns);
$this->
assertIterator($resultArray,
$iterator);
} public static function getTestFilterData() { $inner =
new MockFileListIterator();
// PATH: A/B/C/abc.dat
$inner[] =
new MockSplFileInfo([ 'name' => 'abc.dat',
'relativePathname' => 'A'.\DIRECTORY_SEPARATOR.'B'.\DIRECTORY_SEPARATOR.'C'.\DIRECTORY_SEPARATOR.'abc.dat',
]);