public function ProtectionRuleUnitTest::testEnableProtection in User protect 8
Tests enableProtection().
File
- tests/
src/ Kernel/ Entity/ ProtectionRuleUnitTest.php, line 113
Class
- ProtectionRuleUnitTest
- Various unit tests for protection rules.
Namespace
Drupal\Tests\userprotect\Kernel\EntityCode
public function testEnableProtection() {
$this
->assertInstanceOf(ProtectionRuleInterface::class, $this->protectionRule
->enableProtection('user_name'));
$this
->assertTrue($this->protectionRule
->hasProtection('user_name'));
}