$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,
],
[ $this->fakeSorter,
] ),
$this->fakeTakeAllRuleMatcher,
new LineItemQuantitySplitter($quantityPriceCalculator),
new ProductLineItemProvider() );