'ce_blog_comment' =>
['title', 'content', 'email'
],
'product' =>
['name', 'productNumber', 'price'
],
'dal_entity_search_result' =>
['elements'
],
],
'associations' =>
[ 'topSellerCascade' =>
[],
'linkProductCascade' =>
[],
'comments' =>
[],
],
];
$browser =
$this->
getSalesChannelBrowser();
$browser->
request('POST', '/store-api/script/blog',
$criteria);
$response = \
json_decode((string) $browser->
getResponse()->
getContent(), true, 512, \JSON_THROW_ON_ERROR
);
$salesChannelId =
$browser->
getServerParameter('test-sales-channel-id'
);
$this->
getContainer()->
get(Connection::
class)->
executeStatement('DELETE FROM sales_channel WHERE id = :id',
['id' => Uuid::
fromHexToBytes($salesChannelId)]);
static::
assertSame(Response::HTTP_OK,
$browser->
getResponse()->
getStatusCode(),
print_r($response, true
));
$traces =
$this->
getScriptTraces();
static::
assertArrayHasKey('store-api-blog::response',
$traces);