Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
SignalEventSubscriber example
$this
->
assertTrue
(
$dispatcherCalled
)
;
$this
->
assertTrue
(
$command
->signaled
)
;
}
/** * @requires extension pcntl */
public
function
testSignalSubscriberNotCalledByDefault
(
)
{
$command
=
new
BaseSignableCommand
(
false
)
;
$subscriber
=
new
SignalEventSubscriber
(
)
;
$dispatcher
=
new
EventDispatcher
(
)
;
$dispatcher
->
addSubscriber
(
$subscriber
)
;
$application
=
$this
->
createSignalableApplication
(
$command
,
$dispatcher
)
;
$this
->
assertSame
(
0,
$application
->
run
(
new
ArrayInput
(
[
'signal'
]
)
)
)
;
$this
->
assertFalse
(
$subscriber
->signaled
)
;
}
/** * @requires extension pcntl */