[Routing] Allow spaces in the script name for the apache dumper
This commit is contained in:
parent
6465a6987a
commit
77185e0998
@ -0,0 +1,7 @@
|
||||
# skip "real" requests
|
||||
RewriteCond %{REQUEST_FILENAME} -f
|
||||
RewriteRule .* - [QSA,L]
|
||||
|
||||
# foo
|
||||
RewriteCond %{REQUEST_URI} ^/foo$
|
||||
RewriteRule .* ap\ p_d\ ev.php [QSA,L,E=_ROUTING__route:foo]
|
@ -34,7 +34,7 @@ class ApacheMatcherDumperTest extends \PHPUnit_Framework_TestCase
|
||||
/**
|
||||
* @dataProvider provideEscapeFixtures
|
||||
*/
|
||||
public function testEscape($src, $dest, $char, $with, $message)
|
||||
public function testEscapePattern($src, $dest, $char, $with, $message)
|
||||
{
|
||||
$r = new \ReflectionMethod(new ApacheMatcherDumper($this->getRouteCollection()), 'escape');
|
||||
$r->setAccessible(true);
|
||||
@ -52,6 +52,14 @@ class ApacheMatcherDumperTest extends \PHPUnit_Framework_TestCase
|
||||
);
|
||||
}
|
||||
|
||||
public function testEscapeScriptName()
|
||||
{
|
||||
$collection = new RouteCollection();
|
||||
$collection->add('foo', new Route('/foo'));
|
||||
$dumper = new ApacheMatcherDumper($collection);
|
||||
$this->assertStringEqualsFile(self::$fixturesPath.'/dumper/url_matcher2.apache', $dumper->dump(array('script_name' => 'ap p_d\ ev.php')));
|
||||
}
|
||||
|
||||
private function getRouteCollection()
|
||||
{
|
||||
$collection = new RouteCollection();
|
||||
|
Reference in New Issue
Block a user