You are here

public function ProtectionRuleUnitTest::testDisableProtection in User protect 8

Tests disableProtection().

File

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

Class

ProtectionRuleUnitTest
Various unit tests for protection rules.

Namespace

Drupal\Tests\userprotect\Kernel\Entity

Code

public function testDisableProtection() {
  $this
    ->assertInstanceOf(ProtectionRuleInterface::class, $this->protectionRule
    ->disableProtection('user_mail'));
  $this
    ->assertFalse($this->protectionRule
    ->hasProtection('user_mail'));
}