reverts some behavior changes made in c66d1f9de30fd1b6a86cca10dd79d12c9ba9ff25
This commit is contained in:
parent
9e7a877f7c
commit
a765375e91
@ -261,7 +261,7 @@ class UrlGenerator implements UrlGeneratorInterface, ConfigurableRequirementsInt
|
||||
}
|
||||
|
||||
// add a query string if needed
|
||||
$extra = array_diff_key($parameters, $variables);
|
||||
$extra = array_diff_key($parameters, $variables, $defaults);
|
||||
if ($extra && $query = http_build_query($extra, '', '&')) {
|
||||
$url .= '?'.$query;
|
||||
}
|
||||
|
@ -297,8 +297,8 @@ class UrlGeneratorTest extends \PHPUnit_Framework_TestCase
|
||||
{
|
||||
$routes = $this->getRoutes('test', new Route('/test', array('default' => 'value')));
|
||||
|
||||
$this->assertSame('/app.php/test?default=foo', $this->getGenerator($routes)->generate('test', array('default' => 'foo')));
|
||||
$this->assertSame('/app.php/test?default=value', $this->getGenerator($routes)->generate('test', array('default' => 'value')));
|
||||
$this->assertSame('/app.php/test', $this->getGenerator($routes)->generate('test', array('default' => 'foo')));
|
||||
$this->assertSame('/app.php/test', $this->getGenerator($routes)->generate('test', array('default' => 'value')));
|
||||
$this->assertSame('/app.php/test', $this->getGenerator($routes)->generate('test'));
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user