$response =
$this->
getBrowser()->
getResponse();
static::
assertSame(Response::HTTP_OK,
$response->
getStatusCode(),
(string) $response->
getContent());
$data =
json_decode((string) $response->
getContent(), true, 512, \JSON_THROW_ON_ERROR
);
static::
assertEquals(15,
$data['data'
]['attributes'
]['taxRate'
]);
} public function testWriteExtensionWithExtensionKey(): void
{ $field =
(new OneToManyAssociationField('testSeoUrls', SeoUrlDefinition::
class, 'sales_channel_id'
))->
addFlags(new ApiAware(),
new Extension());
$this->
getContainer()->
get(SalesChannelDefinition::
class)->
getFields()->
addNewField($field);
$salesChannelId = Uuid::
randomHex();
$this->
createSalesChannel($salesChannelId);
$data =
[ 'extensions' =>
[ 'testSeoUrls' =>
[ [ 'languageId' => Defaults::LANGUAGE_SYSTEM,
'foreignKey' =>
$salesChannelId,
'routeName' => 'test',