Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
TaxProviderProcessor example
new
Criteria
(
)
,
Context::
createDefaultContext
(
)
)
;
$taxProviderRegistry
=
new
TaxProviderRegistry
(
[
new
TestConstantTaxRateProvider
(
)
,
]
)
;
$repo
=
static
::
createMock
(
EntityRepository::
class
)
;
$repo
->
method
(
'search'
)
->
willReturn
(
$result
)
;
$processor
=
new
TaxProviderProcessor
(
$repo
,
static
::
createMock
(
LoggerInterface::
class
)
,
$this
->adjustment,
$taxProviderRegistry
,
static
::
createMock
(
TaxProviderPayloadService::
class
)
)
;
$processor
->
process
(
$cart
,
$salesChannelContext
)
;
$lineItem
=
$cart
->
getLineItems
(
)
->
get
(
$this
->ids->
get
(
'line-item-1'
)
)
;
$delivery
=
$cart
->
getDeliveries
(
)
->
first
(
)
;