/**
* @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',
]);
// PATH: A/B/ab.dat
$inner[] =
new MockSplFileInfo([ 'name' => 'ab.dat',
'relativePathname' => 'A'.\DIRECTORY_SEPARATOR.'B'.\DIRECTORY_SEPARATOR.'ab.dat',
]);