You are here

function TaxonomyAccessTestCase::checkRoleDisableLink in Taxonomy Access Control 7

Asserts that a disable 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::checkRoleDisableLink()
TaxonomyAccessConfigTest::testRoleEnableDisable in ./taxonomy_access.test
Tests enabling and disabling TAC for a custom role.

File

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

Class

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

Code

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