Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
SortedPaymentMethodRoute example
$this
->response =
new
PaymentMethodRouteResponse
(
new
EntitySearchResult
(
'entity',
1,
new
PaymentMethodCollection
(
[
$paymentMethod
]
)
,
null,
new
Criteria
(
)
,
Context::
createDefaultContext
(
)
)
)
;
$this
->sortedRoute =
new
SortedPaymentMethodRoute
(
$this
->decorated,
$this
->executor
)
;
}
public
function
testTriggersScriptHookExecution
(
)
: void
{
$this
->decorated
->
expects
(
static
::
once
(
)
)
->
method
(
'load'
)
->
willReturn
(
$this
->response
)
;
$this
->executor->
method
(
'execute'
)
->
with
(
static
::
callback
(
fn
(
PaymentMethodRouteHook
$hook
)
=>
$hook
->
getCollection
(
)
===
$this
->response->
getPaymentMethods
(
)
&&
$hook
->
getSalesChannelContext
(
)
===
$this
->context