adapted previous commit for 2.3
This commit is contained in:
parent
119b0917dc
commit
ec38936fbf
@ -13,6 +13,7 @@ namespace Symfony\Component\Security\Http\RememberMe;
|
|||||||
|
|
||||||
use Symfony\Component\HttpKernel\Event\FilterResponseEvent;
|
use Symfony\Component\HttpKernel\Event\FilterResponseEvent;
|
||||||
use Symfony\Component\HttpKernel\KernelEvents;
|
use Symfony\Component\HttpKernel\KernelEvents;
|
||||||
|
use Symfony\Component\HttpKernel\HttpKernelInterface;
|
||||||
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
|
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -27,7 +28,7 @@ class ResponseListener implements EventSubscriberInterface
|
|||||||
*/
|
*/
|
||||||
public function onKernelResponse(FilterResponseEvent $event)
|
public function onKernelResponse(FilterResponseEvent $event)
|
||||||
{
|
{
|
||||||
if (!$event->isMasterRequest()) {
|
if (HttpKernelInterface::MASTER_REQUEST !== $event->getRequestType()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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('getRequest')->will($this->returnValue($request));
|
||||||
$event->expects($this->any())->method('getRequestType')->will($this->returnValue($type));
|
$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));
|
$event->expects($this->any())->method('getResponse')->will($this->returnValue($response));
|
||||||
|
|
||||||
return $event;
|
return $event;
|
||||||
|
Reference in New Issue
Block a user