Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
getStorefrontCartFacade example
class
StorefrontCartFacadeTest
extends
TestCase
{
public
function
testGetNoBlockedMethods
(
)
: void
{
$cart
=
$this
->
getCart
(
)
;
$cart
->
setErrors
(
$this
->
getCartErrorCollection
(
)
)
;
$cartFacade
=
$this
->
getStorefrontCartFacade
(
$cart
)
;
$salesChannelContext
=
$this
->
getSalesChannelContext
(
)
;
$returnedCart
=
$cartFacade
->
get
(
'',
$salesChannelContext
)
;
static
::
assertEquals
(
$this
->
getCart
(
)
,
$returnedCart
)
;
}
public
function
testGetBlockedShippingMethodAllowFallback
(
)
: void
{
$errorCollection
=
$this
->
getCartErrorCollection
(
true
)
;
$cart
=
$this
->
getCart
(
)
;