minor #20009 [Routing] fix reference type argument type (xabbuh)

This PR was merged into the 3.2-dev branch.

Discussion
----------

[Routing] fix reference type argument type

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets |
| License       | MIT
| Doc PR        |

Commits
-------

a8dd628 [Routing] fix reference type argument type
This commit is contained in:
Fabien Potencier 2016-09-21 08:31:12 -07:00
commit f7f2871eea

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);
}