You are here

function PathautoPersistTestCase::assertAlias in Pathauto Persistent State 7

1 call to PathautoPersistTestCase::assertAlias()
PathautoPersistTestCase::assertEntityAlias in ./pathauto_persist.test

File

./pathauto_persist.test, line 48

Class

PathautoPersistTestCase
Tests for the pathauto_persist module.

Code

function assertAlias($source, $expected_alias, $language = LANGUAGE_NONE) {
  drupal_clear_path_cache($source);
  $alias = drupal_get_path_alias($source, $language);
  $this
    ->assertIdentical($alias, $expected_alias, t("Alias for %source with language '@language' was %actual, expected %expected.", array(
    '%source' => $source,
    '%actual' => $alias,
    '%expected' => $expected_alias,
    '@language' => $language,
  )));
}