Пример #1
0
 public function testRemovePermissions()
 {
     $integrationId = 22;
     $roleName = UserContextInterface::USER_TYPE_INTEGRATION . $integrationId;
     $this->roleMock->expects($this->once())->method('load')->with($roleName)->will($this->returnSelf());
     $this->integrationAuthorizationService->removePermissions($integrationId);
 }
Пример #2
0
 /**
  * @magentoDbIsolation enabled
  */
 public function testGrantAllPermissions()
 {
     $integrationId = rand(1, 1000);
     $this->_service->grantAllPermissions($integrationId);
     $this->_ensurePermissionsAreGranted($integrationId, array('Magento_Adminhtml::all'));
 }
 /**
  * @magentoDbIsolation enabled
  */
 public function testGrantAllPermissions()
 {
     $integrationId = rand(1, 1000);
     $this->_service->grantAllPermissions($integrationId);
     $this->_ensurePermissionsAreGranted($integrationId, ['Magento_Backend::all']);
 }