You are here

function TaxonomyAccessTestCase::checkRoleEnableLink in Taxonomy Access Control 7

Asserts that an enable link is or is not found for the role.

Parameters

int $rid: The role ID to check.

bool $found: Whether the link should be found, or not.

1 call to TaxonomyAccessTestCase::checkRoleEnableLink()
TaxonomyAccessConfigTest::testRoleEnableDisable in ./taxonomy_access.test
Tests enabling and disabling TAC for a custom role.

File

./taxonomy_access.test, line 286
Automated tests for the Taxonomy Access Control module.

Class

TaxonomyAccessTestCase
Provides a base test class and helper methods for automated tests.

Code

function checkRoleEnableLink($rid, $found) {
  if ($found) {
    $this
      ->assertLinkByHref(TAXONOMY_ACCESS_CONFIG . "/role/{$rid}/enable", 0, t('Enable link is available for role %rid.', array(
      '%rid' => $rid,
    )));
  }
  else {
    $this
      ->assertNoLinkByHref(TAXONOMY_ACCESS_CONFIG . "/role/{$rid}/enable", t('Enable link is not available for role %rid.', array(
      '%rid' => $rid,
    )));
  }
}