You are here

public function FinderTest::testRegexSpecialCharsLocationWithPathRestrictionContainingStartFlag in Database Sanitize 7

File

vendor/symfony/finder/Tests/FinderTest.php, line 575

Class

FinderTest

Namespace

Symfony\Component\Finder\Tests

Code

public function testRegexSpecialCharsLocationWithPathRestrictionContainingStartFlag() {
  $finder = $this
    ->buildFinder();
  $finder
    ->in(__DIR__ . \DIRECTORY_SEPARATOR . 'Fixtures' . \DIRECTORY_SEPARATOR . 'r+e.gex[c]a(r)s')
    ->path('/^dir/');
  $expected = array(
    'r+e.gex[c]a(r)s' . \DIRECTORY_SEPARATOR . 'dir',
    'r+e.gex[c]a(r)s' . \DIRECTORY_SEPARATOR . 'dir' . \DIRECTORY_SEPARATOR . 'bar.dat',
  );
  $this
    ->assertIterator($this
    ->toAbsoluteFixtures($expected), $finder);
}