You are here

public function UserRestrictionsExpireTest::testUserRestrictionsRecordExists in User restrictions 8

Ensure the restriction exists in the database.

File

tests/src/Functional/UserRestrictionsExpireTest.php, line 19

Class

UserRestrictionsExpireTest
Tests rule expirations.

Namespace

Drupal\Tests\user_restrictions\Functional

Code

public function testUserRestrictionsRecordExists() {
  $restriction = $this->storage
    ->load($this->id);
  $this
    ->assertNotNull($restriction, 'User Restriction exists in the database');
  $this
    ->assertEqual($restriction
    ->label(), $this->name, 'User restriction exists');
}