static::
assertArrayHasKey(PromotionCollector::SKIP_PROMOTION,
$payload[SalesChannelContextService::PERMISSIONS
]);
static::
assertTrue($payload[SalesChannelContextService::PERMISSIONS
][PromotionCollector::SKIP_PROMOTION
]);
} public function testDeletePermission(): void
{ $this->adminOrderCartService->
addPermission($this->salesChannelContext->
getToken(), PromotionCollector::SKIP_AUTOMATIC_PROMOTIONS,
$this->salesChannelContext->
getSalesChannelId());
$payload =
$this->contextPersister->
load($this->salesChannelContext->
getToken(),
$this->salesChannelContext->
getSalesChannelId());
static::
assertArrayHasKey(PromotionCollector::SKIP_AUTOMATIC_PROMOTIONS,
$payload[SalesChannelContextService::PERMISSIONS
]);
static::
assertTrue($payload[SalesChannelContextService::PERMISSIONS
][PromotionCollector::SKIP_AUTOMATIC_PROMOTIONS
]);
$this->adminOrderCartService->
deletePermission($this->salesChannelContext->
getToken(), PromotionCollector::SKIP_AUTOMATIC_PROMOTIONS,
$this->salesChannelContext->
getSalesChannelId());
$payload =
$this->contextPersister->
load($this->salesChannelContext->
getToken(),
$this->salesChannelContext->
getSalesChannelId());
static::
assertArrayHasKey(PromotionCollector::SKIP_AUTOMATIC_PROMOTIONS,
$payload[SalesChannelContextService::PERMISSIONS
]);
static::
assertFalse($payload[SalesChannelContextService::PERMISSIONS
][PromotionCollector::SKIP_AUTOMATIC_PROMOTIONS
]);
}}