'tax' =>
['id' => Uuid::
randomHex(), 'name' => 'test', 'taxRate' => 19
],
'manufacturer' =>
['name' => 'test'
],
];
$context = Context::
createDefaultContext();
$this->productRepository->
create([$product],
$context);
$this->
addTaxDataToSalesChannel($this->context,
$product['tax'
]);
$product =
$this->productRepository->
search(new Criteria([$id]),
$context)->
get($id);
static::
assertInstanceOf(ProductEntity::
class,
$product);
static::
assertTrue($product->
getAvailable());
$this->
assertStock(10,
$product);
} public function testAvailableWithoutStock(): void
{ $id = Uuid::
randomHex();
$product =
[ 'id' =>
$id,
'productNumber' => Uuid::
randomHex(),