'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);
static::
assertCount(1,
$traces['store-api-blog::response'
]);
static::
assertSame('some debug information',
$traces['store-api-blog::response'
][0
]['output'
][0
]);
$expected =
[ 'apiAlias' => 'store_api_blog_response',