You are here

function PathautoTestHelper::assertAlias in Pathauto 6

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

File

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

Class

PathautoTestHelper
Helper test class with some added functions for testing.

Code

function assertAlias($source, $expected_alias, $language = '') {
  drupal_clear_path_cache();
  $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,
  )));
}