adapted previous commit for 2.3

This commit is contained in:
Fabien Potencier 2015-01-03 11:25:34 +01:00
parent 119b0917dc
commit ec38936fbf
2 changed files with 2 additions and 2 deletions

View File

@ -13,6 +13,7 @@ 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;
/**
@ -27,7 +28,7 @@ class ResponseListener implements EventSubscriberInterface
*/
public function onKernelResponse(FilterResponseEvent $event)
{
if (!$event->isMasterRequest()) {
if (HttpKernelInterface::MASTER_REQUEST !== $event->getRequestType()) {
return;
}

View File

@ -102,7 +102,6 @@ class ResponseListenerTest extends \PHPUnit_Framework_TestCase
$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;