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