summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFabien Potencier <fabien.potencier@gmail.com>2015-01-03 11:28:05 +0100
committerFabien Potencier <fabien.potencier@gmail.com>2015-01-03 11:28:05 +0100
commit397955f27cb14ce8a39c9a25ee3f8527f580f0da (patch)
treef949c6796569d412ba36f41b21b67a52298b98fb
parentfca8c99e4638ba0507993d0bf4afd30e412be78f (diff)
downloadsymfony-security-397955f27cb14ce8a39c9a25ee3f8527f580f0da.zip
symfony-security-397955f27cb14ce8a39c9a25ee3f8527f580f0da.tar.gz
symfony-security-397955f27cb14ce8a39c9a25ee3f8527f580f0da.tar.bz2
adapted merge to 2.5
-rw-r--r--Http/RememberMe/ResponseListener.php3
-rw-r--r--Http/Tests/RememberMe/ResponseListenerTest.php2
2 files changed, 2 insertions, 3 deletions
diff --git a/Http/RememberMe/ResponseListener.php b/Http/RememberMe/ResponseListener.php
index ec5f006..4149fb6 100644
--- a/Http/RememberMe/ResponseListener.php
+++ b/Http/RememberMe/ResponseListener.php
@@ -13,7 +13,6 @@ namespace Symfony\Component\Security\Http\RememberMe;
use Symfony\Component\HttpKernel\Event\FilterResponseEvent;
use Symfony\Component\HttpKernel\KernelEvents;
-use Symfony\Component\HttpKernel\HttpKernelInterface;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
/**
@@ -28,7 +27,7 @@ class ResponseListener implements EventSubscriberInterface
*/
public function onKernelResponse(FilterResponseEvent $event)
{
- if (HttpKernelInterface::MASTER_REQUEST !== $event->getRequestType()) {
+ if (!$event->isMasterRequest()) {
return;
}
diff --git a/Http/Tests/RememberMe/ResponseListenerTest.php b/Http/Tests/RememberMe/ResponseListenerTest.php
index 3dcca70..78de8e4 100644
--- a/Http/Tests/RememberMe/ResponseListenerTest.php
+++ b/Http/Tests/RememberMe/ResponseListenerTest.php
@@ -94,7 +94,7 @@ class ResponseListenerTest extends \PHPUnit_Framework_TestCase
->getMock();
$event->expects($this->any())->method('getRequest')->will($this->returnValue($request));
- $event->expects($this->any())->method('getRequestType')->will($this->returnValue($type));
+ $event->expects($this->any())->method('isMasterRequest')->will($this->returnValue($type === HttpKernelInterface::MASTER_REQUEST));
$event->expects($this->any())->method('getResponse')->will($this->returnValue($response));
return $event;