public function GlobTest::testGlobToRegexDoubleStarWithoutLeadingSlashNotStrictLeadingDot in Database Sanitize 7
File
- vendor/
symfony/ finder/ Tests/ GlobTest.php, line 79
Class
Namespace
Symfony\Component\Finder\TestsCode
public function testGlobToRegexDoubleStarWithoutLeadingSlashNotStrictLeadingDot() {
$finder = new Finder();
$finder
->ignoreDotFiles(false);
$regex = Glob::toRegex('/Fixtures/one/**', false);
foreach ($finder
->in(__DIR__) as $k => $v) {
$k = str_replace(\DIRECTORY_SEPARATOR, '/', $k);
if (preg_match($regex, substr($k, \strlen(__DIR__)))) {
$match[] = substr($k, 10 + \strlen(__DIR__));
}
}
sort($match);
$this
->assertSame(array(
'one/.dot',
'one/a',
'one/b',
'one/b/c.neon',
'one/b/d.neon',
), $match);
}