Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
PromotionActionController example
$packager
=
$this
->
createMock
(
LineItemGroupCountPackager::
class
)
;
$packager
->
method
(
'getKey'
)
->
willReturn
(
'test-packager'
)
;
$sorter
=
$this
->
createMock
(
LineItemGroupPriceAscSorter::
class
)
;
$sorter
->
method
(
'getKey'
)
->
willReturn
(
'test-sorter'
)
;
$serviceRegistry
=
new
LineItemGroupServiceRegistry
(
[
$packager
]
,
[
$sorter
]
,
)
;
$this
->promotionActionController =
new
PromotionActionController
(
$serviceRegistry
)
;
}
public
function
testSetGroupPackager
(
)
: void
{
$response
=
$this
->promotionActionController->
getSetGroupPackagers
(
)
;
$content
=
$response
->
getContent
(
)
;
static
::
assertNotFalse
(
$content
)
;