static::
assertSame([$command],
$event->
getCommands());
} public function testGetCommandsForEntity(): void
{ $ids =
new IdsCollection();
$context = Context::
createDefaultContext();
$writeContext = WriteContext::
createFromContext($context);
$registry =
new StaticDefinitionInstanceRegistry( [new ProductDefinition(),
new MediaDefinition()],
$this->
createMock(ValidatorInterface::
class),
$this->
createMock(EntityWriteGatewayInterface::
class) );
$productDelete =
new DeleteCommand( $registry->
get(ProductDefinition::
class),
['id' =>
$ids->
getBytes('p1'
)],
new EntityExistence('product',
['id' =>
$ids->
getBytes('p1'
)], true, true, true,
[]) );
$mediaDelete =
new DeleteCommand(