static::
assertSame($parentPrice['gross'
],
$parentCurrencyPrice->
getGross());
static::
assertSame($parentName,
$parent->
getName());
$redCurrencyPrice =
$red->
getCurrencyPrice(Defaults::CURRENCY
);
static::
assertInstanceOf(Price::
class,
$redCurrencyPrice);
static::
assertSame($parentPrice['gross'
],
$redCurrencyPrice->
getGross());
static::
assertSame($redName,
$red->
getName());
$greenCurrencyPrice =
$green->
getCurrencyPrice(Defaults::CURRENCY
);
static::
assertInstanceOf(Price::
class,
$greenCurrencyPrice);
static::
assertSame($greenPrice['gross'
],
$greenCurrencyPrice->
getGross());
static::
assertSame($parentName,
$green->
getTranslated()['name'
]);
static::
assertNull($green->
getName());
/** @var array{price: string} $row */
$row =
$this->connection->
fetchAssociative('SELECT `price` FROM product WHERE id = :id',
['id' => Uuid::
fromHexToBytes($parentId)]);
static::
assertEquals(['c' . Defaults::CURRENCY =>
$parentPrice],
json_decode($row['price'
], true, 512, \JSON_THROW_ON_ERROR
));
/** @var array{name: string} $row */
$row =
$this->connection->
fetchAssociative('SELECT `name` FROM product_translation WHERE product_id = :id',
['id' => Uuid::
fromHexToBytes($parentId)]);
static::
assertSame($parentName,
$row['name'
]);
/** @var array{price: string|null} $row */