public function FinderTest::testMultipleLocations in Database Sanitize 7
Searching in multiple locations involves AppendIterator which does an unnecessary rewind which leaves FilterIterator with inner FilesystemIterator in an invalid state.
See also
File
- vendor/
symfony/ finder/ Tests/ FinderTest.php, line 520
Class
Namespace
Symfony\Component\Finder\TestsCode
public function testMultipleLocations() {
$locations = array(
self::$tmpDir . '/',
self::$tmpDir . '/toto/',
);
// it is expected that there are test.py test.php in the tmpDir
$finder = new Finder();
$finder
->in($locations)
->ignoreDotFiles(false)
->depth('< 1')
->name('test.php');
$this
->assertCount(1, $finder);
}