From ad4aaa7f12e8c5cadde0fe4212332b5643b22a9e Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Mon, 22 Sep 2014 22:38:03 +0100 Subject: [PATCH] [Finder] Avoid asterisk in the file path to prevent windows filesystems problems. The other characters in the directory name are sufficient to verify the name is escaped. --- src/Symfony/Component/Finder/Tests/FinderTest.php | 6 +++--- .../{r+e.g?e*x[c]a(r)s => r+e.g?ex[c]a(r)s}/dir/bar.dat | 0 2 files changed, 3 insertions(+), 3 deletions(-) rename src/Symfony/Component/Finder/Tests/Fixtures/{r+e.g?e*x[c]a(r)s => r+e.g?ex[c]a(r)s}/dir/bar.dat (100%) diff --git a/src/Symfony/Component/Finder/Tests/FinderTest.php b/src/Symfony/Component/Finder/Tests/FinderTest.php index 924c67bd897c0..02b04dd5181a0 100644 --- a/src/Symfony/Component/Finder/Tests/FinderTest.php +++ b/src/Symfony/Component/Finder/Tests/FinderTest.php @@ -575,11 +575,11 @@ public function testIteratorKeys(Adapter\AdapterInterface $adapter) public function testRegexSpecialCharsLocationWithPathRestrictionContainingStartFlag(Adapter\AdapterInterface $adapter) { $finder = $this->buildFinder($adapter); - $finder->in(__DIR__.DIRECTORY_SEPARATOR.'Fixtures'.DIRECTORY_SEPARATOR.'r+e.g?e*x[c]a(r)s') + $finder->in(__DIR__.DIRECTORY_SEPARATOR.'Fixtures'.DIRECTORY_SEPARATOR.'r+e.g?ex[c]a(r)s') ->path('/^dir/'); - $expected = array('r+e.g?e*x[c]a(r)s'.DIRECTORY_SEPARATOR.'dir', - 'r+e.g?e*x[c]a(r)s'.DIRECTORY_SEPARATOR.'dir'.DIRECTORY_SEPARATOR.'bar.dat',); + $expected = array('r+e.g?ex[c]a(r)s'.DIRECTORY_SEPARATOR.'dir', + 'r+e.g?ex[c]a(r)s'.DIRECTORY_SEPARATOR.'dir'.DIRECTORY_SEPARATOR.'bar.dat',); $this->assertIterator($this->toAbsoluteFixtures($expected), $finder); } diff --git a/src/Symfony/Component/Finder/Tests/Fixtures/r+e.g?e*x[c]a(r)s/dir/bar.dat b/src/Symfony/Component/Finder/Tests/Fixtures/r+e.g?ex[c]a(r)s/dir/bar.dat similarity index 100% rename from src/Symfony/Component/Finder/Tests/Fixtures/r+e.g?e*x[c]a(r)s/dir/bar.dat rename to src/Symfony/Component/Finder/Tests/Fixtures/r+e.g?ex[c]a(r)s/dir/bar.dat