You are here

protected function ProtectionRuleUnitTest::setUp in User protect 8

Overrides KernelTestBase::setUp

File

tests/src/Kernel/Entity/ProtectionRuleUnitTest.php, line 43

Class

ProtectionRuleUnitTest
Various unit tests for protection rules.

Namespace

Drupal\Tests\userprotect\Kernel\Entity

Code

protected function setUp() {
  parent::setUp();
  $this->manager = UserProtect::pluginManager();
  $this->protectionRule = ProtectionRule::create([
    'name' => 'dummy',
    'label' => 'Dummy',
    'protections' => [
      'user_mail' => [
        'status' => TRUE,
      ],
    ],
    'protectedEntityTypeId' => 'user_role',
    'protectedEntityId' => 'administrator',
  ]);
}