->
with(null
);
$listener =
new ContextListener($tokenStorage,
[], 'key123'
);
$listener(new RequestEvent($this->
createMock(HttpKernelInterface::
class),
$request, HttpKernelInterface::MAIN_REQUEST
));
} public static function provideInvalidToken() { return [ ['foo'
],
['O:8:"NotFound":0:{}'
],
[serialize(new \
__PHP_Incomplete_Class())],
[serialize(null
)],
[null
],
];
} public function testHandleAddsKernelResponseListener() { $tokenStorage =
$this->
createMock(TokenStorageInterface::
class);
$dispatcher =
$this->
createMock(EventDispatcherInterface::
class);
$listener =
new ContextListener($tokenStorage,
[], 'key123', null,
$dispatcher);