Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
KernelEvent example
if
(
null !==
$exception
)
{
throw
$exception
;
}
$this
->
assertSame
(
$userHandler
,
$eHandler
->
setExceptionHandler
(
'var_dump'
)
)
;
}
public
function
testConfigureForHttpKernelWithNoTerminateWithException
(
)
{
$listener
=
new
DebugHandlersListener
(
null
)
;
$eHandler
=
new
ErrorHandler
(
)
;
$event
=
new
KernelEvent
(
$this
->
createMock
(
HttpKernelInterface::
class
)
,
Request::
create
(
'/'
)
,
HttpKernelInterface::MAIN_REQUEST
)
;
$exception
= null;
$h
=
set_exception_handler
(
[
$eHandler
, 'handleException'
]
)
;
try
{
$listener
->
configure
(
$event
)
;
}
catch
(
\Exception
$exception
)
{
}