public function FinderTest::testName in Database Sanitize 7
File
- vendor/
symfony/ finder/ Tests/ FinderTest.php, line 107
Class
Namespace
Symfony\Component\Finder\TestsCode
public function testName() {
$finder = $this
->buildFinder();
$this
->assertSame($finder, $finder
->name('*.php'));
$this
->assertIterator($this
->toAbsolute(array(
'test.php',
)), $finder
->in(self::$tmpDir)
->getIterator());
$finder = $this
->buildFinder();
$finder
->name('test.ph*');
$finder
->name('test.py');
$this
->assertIterator($this
->toAbsolute(array(
'test.php',
'test.py',
)), $finder
->in(self::$tmpDir)
->getIterator());
$finder = $this
->buildFinder();
$finder
->name('~^test~i');
$this
->assertIterator($this
->toAbsolute(array(
'test.php',
'test.py',
)), $finder
->in(self::$tmpDir)
->getIterator());
$finder = $this
->buildFinder();
$finder
->name('~\\.php$~i');
$this
->assertIterator($this
->toAbsolute(array(
'test.php',
)), $finder
->in(self::$tmpDir)
->getIterator());
$finder = $this
->buildFinder();
$finder
->name('test.p{hp,y}');
$this
->assertIterator($this
->toAbsolute(array(
'test.php',
'test.py',
)), $finder
->in(self::$tmpDir)
->getIterator());
}