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\EntityCode
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',
]);
}