Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
cartPage example
}
public
function
testGetCart
(
)
: void
{
$cart
=
new
CheckoutCartPage
(
)
;
$cart
->
setCart
(
new
Cart
(
Uuid::
randomHex
(
)
)
)
;
$this
->cartPageLoaderMock->
method
(
'load'
)
->
willReturn
(
$cart
)
;
$response
=
$this
->controller->
cartPage
(
new
Request
(
)
,
$this
->
createMock
(
SalesChannelContext::
class
)
)
;
static
::
assertEquals
(
new
Response
(
)
,
$response
)
;
}
public
function
testGetCartRedirectNotOnNoErrors
(
)
: void
{
$cart
=
new
CheckoutCartPage
(
)
;
$cart
->
setCart
(
new
Cart
(
Uuid::
randomHex
(
)
)
)
;
$this
->cartPageLoaderMock->
method
(
'load'
)
->
willReturn
(
$cart
)
;