You are here

public function UserRestrictionsBasicTest::testUserRestrictionsRecordExists in User restrictions 8

Ensure the restriction exists in the database.

File

tests/src/Functional/UserRestrictionsBasicTest.php, line 36

Class

UserRestrictionsBasicTest
Defines basic user restriction tests.

Namespace

Drupal\Tests\user_restrictions\Functional

Code

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');
}