adapted merge to 2.5
This commit is contained in:
parent
b1819d4498
commit
27176d9b3d
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
|
Reference in New Issue
Block a user