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

Skip to content

Commit 3a03f3e

Browse files
committed
merged branch jfsimon/issue-7325 (PR symfony#7393)
This PR was merged into the 2.1 branch. Commits ------- bd38483 [Security] fixed HttpUtils class tests Discussion ---------- [Security] fixed HttpUtils class tests This fixes tests broken in symfony#7325. | Q | A | ------------- | --- | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | symfony#7325
2 parents 358689c + bd38483 commit 3a03f3e

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)