Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
getStockUpdateFilterMock example
$stockSubscriber
->
triggerChangeSet
(
$event
)
;
static
::
assertFalse
(
$updateCommand
->
requiresChangeSet
(
)
)
;
}
public
function
testStockUpdateFilterOnOrderPlaced
(
)
: void
{
$ids
= \
array_values
(
$this
->ids->
getList
(
[
'id1', 'id2'
]
)
)
;
$filter
=
$this
->
getStockUpdateFilterMock
(
$ids
)
;
$stockUpdater
=
new
StockUpdater
(
$this
->
getConnectionMock
(
)
,
$this
->dispatcher,
new
StockUpdateFilterProvider
(
[
$filter
]
)
,
)
;
$event
=
new
CheckoutOrderPlacedEvent
(
Context::
createDefaultContext
(
)
,
$this
->
createOrder
(
)
,
$this
->ids->
get
(
'sales-channel'
)
)
;