You are here

public function AccessSchemeInterfaceTest::testSchemeOverviewEmpty in Access Control Kit 7

Test the scheme overview with no schemes.

File

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

Class

AccessSchemeInterfaceTest
Tests the access scheme interface.

Code

public function testSchemeOverviewEmpty() {

  // Delete all schemes.
  $schemes = access_scheme_load_multiple(FALSE);
  foreach ($schemes as $sid => $scheme) {
    access_scheme_delete($sid);
  }

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

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