Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
quickviewMinimal example
static
::
assertEquals
(
'{"url":"","productId":"' .
$ids
->
get
(
'product'
)
. '"}',
$response
->
getContent
(
)
)
;
}
public
function
testQuickViewMinimal
(
)
: void
{
$ids
=
new
IdsCollection
(
)
;
$request
=
new
Request
(
[
'productId' =>
$ids
->
get
(
'productId'
)
]
)
;
$this
->minimalQuickViewPageLoaderMock->
method
(
'load'
)
->
with
(
$request
)
->
willReturn
(
new
MinimalQuickViewPage
(
new
ProductEntity
(
)
)
)
;
$response
=
$this
->controller->
quickviewMinimal
(
$request
,
$this
->
createMock
(
SalesChannelContext::
class
)
)
;
static
::
assertEquals
(
Response::HTTP_OK,
$response
->
getStatusCode
(
)
)
;
static
::
assertInstanceOf
(
MinimalQuickViewPage::
class
,
$this
->controller->renderStorefrontParameters
[
'page'
]
)
;
static
::
assertInstanceOf
(
ProductQuickViewWidgetLoadedHook::
class
,
$this
->controller->calledHook
)
;
}
public
function
testSaveReviewDeactivated
(
)
: void
{