UserRestrictionsBasicTest.php in User restrictions 8
File
tests/src/Functional/UserRestrictionsBasicTest.php
View source
<?php
namespace Drupal\Tests\user_restrictions\Functional;
class UserRestrictionsBasicTest extends UserRestrictionsTestBase {
protected $id = 'test_rule_1';
protected $label = 'Test rule #1';
protected $type = 'name';
public function testUserRestrictionsRecordExists() {
$restriction = $this->storage
->load($this->id);
$this
->assertTrue($restriction, 'User restriction exists in the database');
$this
->assertEqual($restriction
->label(), $this->label, 'User restriction name matches');
$this
->assertEqual($restriction
->getRuleType(), $this->type, 'User restriction type matches');
}
}