static::
assertSame('product',
$response['elements'
][0
]['apiAlias'
]);
static::
assertArrayHasKey('id',
$response['elements'
][0
]);
static::
assertArrayHasKey('apiAlias',
$response['elements'
][0
]);
static::
assertArrayNotHasKey('name',
$response['elements'
][0
]);
} public function testListingProductsIncludesOnlyPublicReviews(): void
{ $product =
(new ProductBuilder($this->ids, 'p1'
)) ->
visibility($this->ids->
get('sales-channel'
)) ->
price(10
) ->
review('test public review', 'this is a public review', 3,
$this->ids->
get('sales-channel'
)) ->
review('test hidden review', 'this is a hidden review', 0,
$this->ids->
get('sales-channel'
), Defaults::LANGUAGE_SYSTEM, false
) ->
build();
$this->
getContainer()->
get('product.repository'
) ->
upsert([$product], Context::
createDefaultContext());
$this->browser->
request( 'POST',
'/store-api/product',
[ 'filter' =>
[[