|
@@ -34,7 +34,7 @@ class ApacheMatcherDumperTest extends \PHPUnit_Framework_TestCase
|
|
/**
|
|
/**
|
|
* @dataProvider provideEscapeFixtures
|
|
* @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 = new \ReflectionMethod(new ApacheMatcherDumper($this->getRouteCollection()), 'escape');
|
|
$r->setAccessible(true);
|
|
$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()
|
|
private function getRouteCollection()
|
|
{
|
|
{
|
|
$collection = new RouteCollection();
|
|
$collection = new RouteCollection();
|