diff options
author | Fabien Potencier <fabien.potencier@gmail.com> | 2016-12-19 17:13:57 +0100 |
---|---|---|
committer | Fabien Potencier <fabien.potencier@gmail.com> | 2016-12-19 17:13:57 +0100 |
commit | 9ba5cbed388bbf235d6ba2e2211134ff5514960f (patch) | |
tree | 669494c864e907ed8c1f286dd049c11739b93472 /Http/Tests/FirewallMapTest.php | |
parent | 3b5625de42114cd121282bdfc4879a28e85d64ec (diff) | |
parent | 7a9b11f3428243d368690b9485098e2d531703e7 (diff) | |
download | symfony-security-9ba5cbed388bbf235d6ba2e2211134ff5514960f.zip symfony-security-9ba5cbed388bbf235d6ba2e2211134ff5514960f.tar.gz symfony-security-9ba5cbed388bbf235d6ba2e2211134ff5514960f.tar.bz2 |
Merge branch '3.2'
* 3.2:
fixed obsolete getMock() usage
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/FirewallMapTest.php')
-rw-r--r-- | Http/Tests/FirewallMapTest.php | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/Http/Tests/FirewallMapTest.php b/Http/Tests/FirewallMapTest.php index 85a57ab..016c72d 100644 --- a/Http/Tests/FirewallMapTest.php +++ b/Http/Tests/FirewallMapTest.php @@ -22,7 +22,7 @@ class FirewallMapTest extends \PHPUnit_Framework_TestCase $request = new Request(); - $notMatchingMatcher = $this->getMock('Symfony\Component\HttpFoundation\RequestMatcher'); + $notMatchingMatcher = $this->getMockBuilder('Symfony\Component\HttpFoundation\RequestMatcher')->getMock(); $notMatchingMatcher ->expects($this->once()) ->method('matches') @@ -30,27 +30,27 @@ class FirewallMapTest extends \PHPUnit_Framework_TestCase ->will($this->returnValue(false)) ; - $map->add($notMatchingMatcher, array($this->getMock('Symfony\Component\Security\Http\Firewall\ListenerInterface'))); + $map->add($notMatchingMatcher, array($this->getMockBuilder('Symfony\Component\Security\Http\Firewall\ListenerInterface')->getMock())); - $matchingMatcher = $this->getMock('Symfony\Component\HttpFoundation\RequestMatcher'); + $matchingMatcher = $this->getMockBuilder('Symfony\Component\HttpFoundation\RequestMatcher')->getMock(); $matchingMatcher ->expects($this->once()) ->method('matches') ->with($this->equalTo($request)) ->will($this->returnValue(true)) ; - $theListener = $this->getMock('Symfony\Component\Security\Http\Firewall\ListenerInterface'); - $theException = $this->getMock('Symfony\Component\Security\Http\Firewall\ExceptionListener', array(), array(), '', false); + $theListener = $this->getMockBuilder('Symfony\Component\Security\Http\Firewall\ListenerInterface')->getMock(); + $theException = $this->getMockBuilder('Symfony\Component\Security\Http\Firewall\ExceptionListener')->disableOriginalConstructor()->getMock(); $map->add($matchingMatcher, array($theListener), $theException); - $tooLateMatcher = $this->getMock('Symfony\Component\HttpFoundation\RequestMatcher'); + $tooLateMatcher = $this->getMockBuilder('Symfony\Component\HttpFoundation\RequestMatcher')->getMock(); $tooLateMatcher ->expects($this->never()) ->method('matches') ; - $map->add($tooLateMatcher, array($this->getMock('Symfony\Component\Security\Http\Firewall\ListenerInterface'))); + $map->add($tooLateMatcher, array($this->getMockBuilder('Symfony\Component\Security\Http\Firewall\ListenerInterface')->getMock())); list($listeners, $exception) = $map->getListeners($request); @@ -64,7 +64,7 @@ class FirewallMapTest extends \PHPUnit_Framework_TestCase $request = new Request(); - $notMatchingMatcher = $this->getMock('Symfony\Component\HttpFoundation\RequestMatcher'); + $notMatchingMatcher = $this->getMockBuilder('Symfony\Component\HttpFoundation\RequestMatcher')->getMock(); $notMatchingMatcher ->expects($this->once()) ->method('matches') @@ -72,20 +72,20 @@ class FirewallMapTest extends \PHPUnit_Framework_TestCase ->will($this->returnValue(false)) ; - $map->add($notMatchingMatcher, array($this->getMock('Symfony\Component\Security\Http\Firewall\ListenerInterface'))); + $map->add($notMatchingMatcher, array($this->getMockBuilder('Symfony\Component\Security\Http\Firewall\ListenerInterface')->getMock())); - $theListener = $this->getMock('Symfony\Component\Security\Http\Firewall\ListenerInterface'); - $theException = $this->getMock('Symfony\Component\Security\Http\Firewall\ExceptionListener', array(), array(), '', false); + $theListener = $this->getMockBuilder('Symfony\Component\Security\Http\Firewall\ListenerInterface')->getMock(); + $theException = $this->getMockBuilder('Symfony\Component\Security\Http\Firewall\ExceptionListener')->disableOriginalConstructor()->getMock(); $map->add(null, array($theListener), $theException); - $tooLateMatcher = $this->getMock('Symfony\Component\HttpFoundation\RequestMatcher'); + $tooLateMatcher = $this->getMockBuilder('Symfony\Component\HttpFoundation\RequestMatcher')->getMock(); $tooLateMatcher ->expects($this->never()) ->method('matches') ; - $map->add($tooLateMatcher, array($this->getMock('Symfony\Component\Security\Http\Firewall\ListenerInterface'))); + $map->add($tooLateMatcher, array($this->getMockBuilder('Symfony\Component\Security\Http\Firewall\ListenerInterface')->getMock())); list($listeners, $exception) = $map->getListeners($request); @@ -99,7 +99,7 @@ class FirewallMapTest extends \PHPUnit_Framework_TestCase $request = new Request(); - $notMatchingMatcher = $this->getMock('Symfony\Component\HttpFoundation\RequestMatcher'); + $notMatchingMatcher = $this->getMockBuilder('Symfony\Component\HttpFoundation\RequestMatcher')->getMock(); $notMatchingMatcher ->expects($this->once()) ->method('matches') @@ -107,7 +107,7 @@ class FirewallMapTest extends \PHPUnit_Framework_TestCase ->will($this->returnValue(false)) ; - $map->add($notMatchingMatcher, array($this->getMock('Symfony\Component\Security\Http\Firewall\ListenerInterface'))); + $map->add($notMatchingMatcher, array($this->getMockBuilder('Symfony\Component\Security\Http\Firewall\ListenerInterface')->getMock())); list($listeners, $exception) = $map->getListeners($request); |