Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
TriggerFlowController example
$this
->appFlowEventRepository =
new
StaticEntityRepository
(
[
new
EntitySearchResult
(
'app_flow_event',
1,
new
AppFlowEventCollection
(
[
$appFlowEvent
]
)
,
null,
new
Criteria
(
)
,
Context::
createDefaultContext
(
)
,
)
,
]
)
;
$this
->triggerFlowController =
new
TriggerFlowController
(
new
EventDispatcher
(
)
,
$this
->appFlowEventRepository
)
;
}
public
function
testTriggerWithWrongEventName
(
)
: void
{
$this
->
expectExceptionObject
(
new
CustomTriggerByNameNotFoundException
(
'custom.checkout.event'
)
)
;
$request
=
new
Request
(
)
;
$request
->
setMethod
(
'POST'
)
;
$context
= Context::
createDefaultContext
(
)
;
$appFlowEventRepository
=
new
StaticEntityRepository
(
[
new
EntitySearchResult
(