Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
callbackLoadShippingMethods example
$shippingMethodRoute
=
$this
->
createMock
(
ShippingMethodRoute::
class
)
;
if
(
$dontReturnAnyOtherShippingMethod
)
{
$shippingMethodRoute
->
method
(
'load'
)
->
withAnyParameters
(
)
->
willReturnCallback
(
$this
->
callbackLoadShippingMethodsForAllBlocked
(
...
)
)
;
}
else
{
$shippingMethodRoute
->
method
(
'load'
)
->
withAnyParameters
(
)
->
willReturnCallback
(
$this
->
callbackLoadShippingMethods
(
...
)
)
;
}
return
$shippingMethodRoute
;
}
}