[Routing] fix reference type argument type

This commit is contained in:
Christian Flothmann 2016-09-21 16:43:50 +02:00
parent 167c14f248
commit a8dd62828d

View File

@ -647,17 +647,17 @@ class UrlGeneratorTest extends \PHPUnit_Framework_TestCase
{
$routes = $this->getRoutes('test', new Route('/testing'));
$url = $this->getGenerator($routes)->generate('test', array('_fragment' => 'frag ment'), true);
$url = $this->getGenerator($routes)->generate('test', array('_fragment' => 'frag ment'), UrlGeneratorInterface::ABSOLUTE_PATH);
$this->assertEquals('/app.php/testing#frag%20ment', $url);
$url = $this->getGenerator($routes)->generate('test', array('_fragment' => '0'), true);
$url = $this->getGenerator($routes)->generate('test', array('_fragment' => '0'), UrlGeneratorInterface::ABSOLUTE_PATH);
$this->assertEquals('/app.php/testing#0', $url);
}
public function testFragmentsDoNotEscapeValidCharacters()
{
$routes = $this->getRoutes('test', new Route('/testing'));
$url = $this->getGenerator($routes)->generate('test', array('_fragment' => '?/'), true);
$url = $this->getGenerator($routes)->generate('test', array('_fragment' => '?/'), UrlGeneratorInterface::ABSOLUTE_PATH);
$this->assertEquals('/app.php/testing#?/', $url);
}