You are here

public function AccessGrantInterfaceTest::testGrantOverviewEmpty in Access Control Kit 7

Test the grant overview with no grants.

File

./access.test, line 842
Tests for the access control kit module.

Class

AccessGrantInterfaceTest
Tests the access grant interface.

Code

public function testGrantOverviewEmpty() {

  // Delete all grants.
  $grants = access_grant_load_multiple(FALSE);
  foreach ($grants as $gid => $grant) {
    access_grant_delete($gid);
  }

  // Confirm that no grants remain in the database.
  $this
    ->assertFalse(access_grant_load_multiple(FALSE), 'No access grants found in the database.');

  // Check the default message for no grants.
  $this
    ->drupalGet('admin/access');
  $this
    ->assertText(t('No access grants available.'), 'No access grants were found.');
}