Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
FakeLineItemGroupTakeAllPackager example
private
LineItemGroupBuilder
$integrationTestBuilder
;
protected
function
setUp
(
)
: void
{
parent::
setUp
(
)
;
$this
->context =
$this
->
getMockBuilder
(
SalesChannelContext::
class
)
->
disableOriginalConstructor
(
)
->
getMock
(
)
;
$this
->context->
method
(
'getItemRounding'
)
->
willReturn
(
new
CashRoundingConfig
(
2, 0.01, true
)
)
;
$this
->fakeSequenceSupervisor =
new
FakeSequenceSupervisor
(
)
;
$this
->fakeTakeAllPackager =
new
FakeLineItemGroupTakeAllPackager
(
'FAKE-PACKAGER',
$this
->fakeSequenceSupervisor
)
;
$this
->fakeSorter =
new
FakeLineItemGroupSorter
(
'FAKE-SORTER',
$this
->fakeSequenceSupervisor
)
;
$this
->fakeTakeAllRuleMatcher =
new
FakeTakeAllRuleMatcher
(
$this
->fakeSequenceSupervisor
)
;
$quantityPriceCalculator
=
$this
->
createQuantityPriceCalculator
(
)
;
$this
->integrationTestBuilder =
new
LineItemGroupBuilder
(
new
LineItemGroupServiceRegistry
(
[
$this
->fakeTakeAllPackager,
]
,
[