$events = StockUpdater::
getSubscribedEvents();
static::
assertArrayHasKey(CheckoutOrderPlacedEvent::
class,
$events);
static::
assertArrayHasKey(StateMachineTransitionEvent::
class,
$events);
static::
assertArrayHasKey(PreWriteValidationEvent::
class,
$events);
static::
assertArrayHasKey(OrderEvents::ORDER_LINE_ITEM_WRITTEN_EVENT,
$events);
static::
assertArrayHasKey(OrderEvents::ORDER_LINE_ITEM_DELETED_EVENT,
$events);
} public function testTriggerChangeSetWithNonLiveVersion(): void
{ $definition =
new OrderLineItemDefinition();
$primaryKey =
['id' => 'some_id'
];
$existence =
new EntityExistence('order_line_item',
[], false, false, false,
[]);
$path = 'order_line_items';
$commands =
[new UpdateCommand( $definition,
['referenced_id' => 'new_referenced_id'
],
$primaryKey,
$existence,
$path )];