'productNumber' => Uuid::
randomHex(),
'name' => '😄',
'stock' => 1,
'ean' => 'EAN-1',
'price' =>
[['currencyId' => Defaults::CURRENCY, 'gross' => 100, 'net' => 10, 'linked' => false
]],
'manufacturer' =>
['name' => 'create'
],
'tax' =>
['name' => 'create', 'taxRate' => 1
],
];
$affected =
$this->
getContainer()->
get('product.repository'
)->
create([$product], Context::
createDefaultContext());
static::
assertInstanceOf(EntityWrittenEvent::
class,
$affected->
getEventByEntityName(ProductTranslationDefinition::ENTITY_NAME
));
$writtenProductTranslations =
$affected->
getEventByEntityName(ProductTranslationDefinition::ENTITY_NAME
)->
getPayloads();
static::
assertCount(1,
$writtenProductTranslations);
static::
assertEquals('😄',
$writtenProductTranslations[0
]['name'
]);
} public function testCreateOrderVersion(): void
{ $ruleId = Uuid::
randomHex();
$customerId =
$this->
createCustomer();
$paymentMethodId =
$this->
createPaymentMethod($ruleId);
$this->
addCountriesToSalesChannel();