class StructEncoderTest extends TestCase
{ /**
* Regression test where the cheapest price and cheapest price container were exposed because the StructEncoder did not consider sales channel definitions
*/
public function testCheapestPricesAreNotExposed(): void
{ $product =
new SalesChannelProductEntity();
$product->
internalSetEntityData('product',
new FieldVisibility([]));
$product->
setName('test'
);
$product->
setCheapestPrice( (new CheapestPrice())->
assign([ 'hasRange' => false,
'variantId' => Uuid::
randomHex(),
'parentId' => Uuid::
randomHex(),
'ruleId' => Uuid::
randomHex(),
'purchase' => 1.0,
'reference' => 1.0,
'price' =>
new PriceCollection(),
]) );