Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
CrossSellingCmsElementResolver example
private
CrossSellingCmsElementResolver
$crossSellingResolver
;
protected
function
setUp
(
)
: void
{
$mock
=
$this
->
createMock
(
AbstractProductCrossSellingRoute::
class
)
;
$mock
->
method
(
'load'
)
->
willReturn
(
new
ProductCrossSellingRouteResponse
(
new
CrossSellingElementCollection
(
)
)
)
;
$this
->crossSellingResolver =
new
CrossSellingCmsElementResolver
(
$mock
)
;
}
public
function
testType
(
)
: void
{
static
::
assertSame
(
'cross-selling',
$this
->crossSellingResolver->
getType
(
)
)
;
}
public
function
testCollectWithEmptyConfig
(
)
: void
{
$resolverContext
=
new
ResolverContext
(
$this
->
createMock
(
SalesChannelContext::
class
)
,
new
Request
(
)
)
;