You are here

function SubPathautoUnitTestCase::addAlias in Sub-pathauto (Sub-path URL Aliases) 7

1 call to SubPathautoUnitTestCase::addAlias()
SubPathautoUnitTestCase::setUp in ./subpathauto.test
Sets up a Drupal site for running functional and integration tests.

File

./subpathauto.test, line 130
Test integration for the subpathauto.module.

Class

SubPathautoUnitTestCase
@file Test integration for the subpathauto.module.

Code

function addAlias($source, $alias, $langcode = LANGUAGE_NONE) {
  $alias = array(
    'source' => $source,
    'alias' => $alias,
    'language' => $langcode,
  );
  path_save($alias);
  drupal_clear_path_cache();
}