2 calls to SubPathautoUnitTestCase::assertAlias()
SubPathautoUnitTestCase::assertNoAlias in ./subpathauto.test
SubPathautoUnitTestCase::testSubPathAliases in ./subpathauto.test

File

./subpathauto.test, line 113

Class

SubPathautoUnitTestCase
@file Test integration for the <a href="/en/work/drupal-api/subpathauto/subpathauto.module/7.x-1.x" title="subpathauto.module" class="local">subpathauto.module</a>.

Code

function assertAlias($source, $alias, array $options = array()) {
    $actual_alias = $this->getPathAlias($source, $options);
    $actual_source = drupal_get_normal_path($alias);
    $args = array(
        '@source' => $source,
        '@alias' => $alias,
        '@source-actual' => $actual_source,
        '@alias-actual' => $actual_alias,
    );
    return $this->assertIdentical($alias, $actual_alias, t("drupal_get_path_alias('@source') was '@alias-actual' and expected '@alias'", $args)) || $this->assertIdentical($source, $actual_source, t("drupal_get_normal_path('@alias') was '@source-actual' and expected '@source'", $args));
}