static::
assertSame(403,
$this->browser->
getResponse()->
getStatusCode());
$response =
json_decode($this->browser->
getResponse()->
getContent() ?: '', true, 512, \JSON_THROW_ON_ERROR
);
static::
assertSame('CHECKOUT__INSUFFICIENT_PERMISSION',
$response['errors'
][0
]['code'
]);
} public function testAddCustomWithPermission(): void
{ $this->
enableAdminAccess();
$this->browser
->
request( 'POST',
'/store-api/checkout/cart/line-item',
[ 'items' =>
[ [ 'label' => 'Test',
'type' => 'credit',
'priceDefinition' =>
[ 'price' => 100.0,