$map =
$this->
createMock(FirewallMapInterface::
class);
$map ->
expects($this->
once()) ->
method('getListeners'
) ->
with($this->
equalTo($request)) ->
willReturn([[],
$listener, null
]) ;
$event =
new RequestEvent($this->
createMock(HttpKernelInterface::
class),
$request, HttpKernelInterface::MAIN_REQUEST
);
$firewall =
new Firewall($map,
$dispatcher);
$firewall->
onKernelRequest($event);
} public function testOnKernelRequestStopsWhenThereIsAResponse() { $called =
[];
$first =
function D
) use (&
$called) { $called[] = 1;
};