public function testGrantAllPermissions() { $rootResource = 'Magento_All:all'; $this->rootAclResourceMock->expects($this->any())->method('getId')->will($this->returnValue($rootResource)); $this->roleMock->expects($this->any())->method('getId')->will($this->returnValue(self::ROLE_ID)); $this->rulesMock->expects($this->any())->method('setRoleId')->with(self::ROLE_ID)->will($this->returnSelf()); $this->rulesMock->expects($this->any())->method('setResources')->with([$rootResource])->will($this->returnSelf()); $this->rulesMock->expects($this->any())->method('saveRel')->will($this->returnSelf()); $this->integrationAuthorizationService->grantAllPermissions(self::INTEGRATION_ID); }
/** * @magentoDbIsolation enabled */ public function testGrantAllPermissions() { $integrationId = rand(1, 1000); $this->_service->grantAllPermissions($integrationId); $this->_ensurePermissionsAreGranted($integrationId, ['Magento_Backend::all']); }