diff options
author | Fabien Potencier <fabien.potencier@gmail.com> | 2016-12-19 17:07:36 +0100 |
---|---|---|
committer | Fabien Potencier <fabien.potencier@gmail.com> | 2016-12-19 17:07:36 +0100 |
commit | 7a9b11f3428243d368690b9485098e2d531703e7 (patch) | |
tree | 07877047d607cee71ae0312b36c80bbbd040f19f /Http/Tests/HttpUtilsTest.php | |
parent | 946bae1b15cb634ea9705476f4bb34fbede6fd2b (diff) | |
parent | b6686776ba39726bafa6435319ba0b3686e41498 (diff) | |
download | symfony-security-7a9b11f3428243d368690b9485098e2d531703e7.zip symfony-security-7a9b11f3428243d368690b9485098e2d531703e7.tar.gz symfony-security-7a9b11f3428243d368690b9485098e2d531703e7.tar.bz2 |
Merge branch '3.1' into 3.2
* 3.1:
fixed obsolete getMock() usage
fixed obsolete getMock() usage
fixed obsolete getMock() usage
[WebProfilerBundle] Display multiple HTTP headers in WDT
do not remove the Twig ExceptionController service
removed obsolete condition
do not try to register incomplete definitions
Diffstat (limited to 'Http/Tests/HttpUtilsTest.php')
-rw-r--r-- | Http/Tests/HttpUtilsTest.php | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/Http/Tests/HttpUtilsTest.php b/Http/Tests/HttpUtilsTest.php index 45a0281..bb432a0 100644 --- a/Http/Tests/HttpUtilsTest.php +++ b/Http/Tests/HttpUtilsTest.php @@ -39,7 +39,7 @@ class HttpUtilsTest extends \PHPUnit_Framework_TestCase public function testCreateRedirectResponseWithRouteName() { - $utils = new HttpUtils($urlGenerator = $this->getMock('Symfony\Component\Routing\Generator\UrlGeneratorInterface')); + $utils = new HttpUtils($urlGenerator = $this->getMockBuilder('Symfony\Component\Routing\Generator\UrlGeneratorInterface')->getMock()); $urlGenerator ->expects($this->any()) @@ -50,7 +50,7 @@ class HttpUtilsTest extends \PHPUnit_Framework_TestCase $urlGenerator ->expects($this->any()) ->method('getContext') - ->will($this->returnValue($this->getMock('Symfony\Component\Routing\RequestContext'))) + ->will($this->returnValue($this->getMockBuilder('Symfony\Component\Routing\RequestContext')->getMock())) ; $response = $utils->createRedirectResponse($this->getRequest(), 'foobar'); @@ -73,7 +73,7 @@ class HttpUtilsTest extends \PHPUnit_Framework_TestCase public function testCreateRequestWithRouteName() { - $utils = new HttpUtils($urlGenerator = $this->getMock('Symfony\Component\Routing\Generator\UrlGeneratorInterface')); + $utils = new HttpUtils($urlGenerator = $this->getMockBuilder('Symfony\Component\Routing\Generator\UrlGeneratorInterface')->getMock()); $urlGenerator ->expects($this->once()) @@ -83,7 +83,7 @@ class HttpUtilsTest extends \PHPUnit_Framework_TestCase $urlGenerator ->expects($this->any()) ->method('getContext') - ->will($this->returnValue($this->getMock('Symfony\Component\Routing\RequestContext'))) + ->will($this->returnValue($this->getMockBuilder('Symfony\Component\Routing\RequestContext')->getMock())) ; $subRequest = $utils->createRequest($this->getRequest(), 'foobar'); @@ -93,7 +93,7 @@ class HttpUtilsTest extends \PHPUnit_Framework_TestCase public function testCreateRequestWithAbsoluteUrl() { - $utils = new HttpUtils($this->getMock('Symfony\Component\Routing\Generator\UrlGeneratorInterface')); + $utils = new HttpUtils($this->getMockBuilder('Symfony\Component\Routing\Generator\UrlGeneratorInterface')->getMock()); $subRequest = $utils->createRequest($this->getRequest(), 'http://symfony.com/'); $this->assertEquals('/', $subRequest->getPathInfo()); @@ -102,7 +102,7 @@ class HttpUtilsTest extends \PHPUnit_Framework_TestCase public function testCreateRequestPassesSessionToTheNewRequest() { $request = $this->getRequest(); - $request->setSession($session = $this->getMock('Symfony\Component\HttpFoundation\Session\SessionInterface')); + $request->setSession($session = $this->getMockBuilder('Symfony\Component\HttpFoundation\Session\SessionInterface')->getMock()); $utils = new HttpUtils($this->getUrlGenerator()); $subRequest = $utils->createRequest($request, '/foobar'); @@ -148,7 +148,7 @@ class HttpUtilsTest extends \PHPUnit_Framework_TestCase public function testCheckRequestPathWithUrlMatcherAndResourceNotFound() { - $urlMatcher = $this->getMock('Symfony\Component\Routing\Matcher\UrlMatcherInterface'); + $urlMatcher = $this->getMockBuilder('Symfony\Component\Routing\Matcher\UrlMatcherInterface')->getMock(); $urlMatcher ->expects($this->any()) ->method('match') @@ -163,7 +163,7 @@ class HttpUtilsTest extends \PHPUnit_Framework_TestCase public function testCheckRequestPathWithUrlMatcherAndMethodNotAllowed() { $request = $this->getRequest(); - $urlMatcher = $this->getMock('Symfony\Component\Routing\Matcher\RequestMatcherInterface'); + $urlMatcher = $this->getMockBuilder('Symfony\Component\Routing\Matcher\RequestMatcherInterface')->getMock(); $urlMatcher ->expects($this->any()) ->method('matchRequest') @@ -177,7 +177,7 @@ class HttpUtilsTest extends \PHPUnit_Framework_TestCase public function testCheckRequestPathWithUrlMatcherAndResourceFoundByUrl() { - $urlMatcher = $this->getMock('Symfony\Component\Routing\Matcher\UrlMatcherInterface'); + $urlMatcher = $this->getMockBuilder('Symfony\Component\Routing\Matcher\UrlMatcherInterface')->getMock(); $urlMatcher ->expects($this->any()) ->method('match') @@ -192,7 +192,7 @@ class HttpUtilsTest extends \PHPUnit_Framework_TestCase public function testCheckRequestPathWithUrlMatcherAndResourceFoundByRequest() { $request = $this->getRequest(); - $urlMatcher = $this->getMock('Symfony\Component\Routing\Matcher\RequestMatcherInterface'); + $urlMatcher = $this->getMockBuilder('Symfony\Component\Routing\Matcher\RequestMatcherInterface')->getMock(); $urlMatcher ->expects($this->any()) ->method('matchRequest') @@ -209,7 +209,7 @@ class HttpUtilsTest extends \PHPUnit_Framework_TestCase */ public function testCheckRequestPathWithUrlMatcherLoadingException() { - $urlMatcher = $this->getMock('Symfony\Component\Routing\Matcher\UrlMatcherInterface'); + $urlMatcher = $this->getMockBuilder('Symfony\Component\Routing\Matcher\UrlMatcherInterface')->getMock(); $urlMatcher ->expects($this->any()) ->method('match') @@ -250,7 +250,7 @@ class HttpUtilsTest extends \PHPUnit_Framework_TestCase private function getUrlGenerator($generatedUrl = '/foo/bar') { - $urlGenerator = $this->getMock('Symfony\Component\Routing\Generator\UrlGeneratorInterface'); + $urlGenerator = $this->getMockBuilder('Symfony\Component\Routing\Generator\UrlGeneratorInterface')->getMock(); $urlGenerator ->expects($this->any()) ->method('generate') |