You are here

function PathautoTestHelper::assertAlias in Pathauto 7

Same name and namespace in other branches
  1. 6.2 pathauto.test \PathautoTestHelper::assertAlias()
  2. 6 pathauto.test \PathautoTestHelper::assertAlias()
1 call to PathautoTestHelper::assertAlias()
PathautoTestHelper::assertEntityAlias in ./pathauto.test

File

./pathauto.test, line 67
Functionality tests for Pathauto.

Class

PathautoTestHelper
Helper test class with some added functions for testing.

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,
  )));
}