Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit bd38483

Browse files
committed
[Security] fixed HttpUtils class tests
1 parent 6c0d2b9 commit bd38483

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/Symfony/Component/Security/Tests/Http/HttpUtilsTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -137,16 +137,16 @@ public function testCheckRequestPathWithUrlMatcherLoadingException()
137137
$utils->checkRequestPath($this->getRequest(), 'foobar');
138138
}
139139

140-
public function testGenerateUrlRemovesQueryString()
140+
public function testGenerateUriRemovesQueryString()
141141
{
142-
$method = new \ReflectionMethod('Symfony\Component\Security\Http\HttpUtils', 'generateUrl');
142+
$method = new \ReflectionMethod('Symfony\Component\Security\Http\HttpUtils', 'generateUri');
143143
$method->setAccessible(true);
144144

145145
$utils = new HttpUtils($this->getUrlGenerator());
146-
$this->assertEquals('/foo/bar', $method->invoke($utils, 'route_name'));
146+
$this->assertEquals('/foo/bar', $method->invoke($utils, new Request(), 'route_name'));
147147

148148
$utils = new HttpUtils($this->getUrlGenerator('/foo/bar?param=value'));
149-
$this->assertEquals('/foo/bar', $method->invoke($utils, 'route_name'));
149+
$this->assertEquals('/foo/bar', $method->invoke($utils, new Request(), 'route_name'));
150150
}
151151

152152
private function getUrlGenerator($generatedUrl = '/foo/bar')

0 commit comments

Comments
 (0)