You are here

function PathautoTestHelper::saveEntityAlias in Pathauto 7

Same name and namespace in other branches
  1. 6.2 pathauto.test \PathautoTestHelper::saveEntityAlias()
  2. 6 pathauto.test \PathautoTestHelper::saveEntityAlias()
2 calls to PathautoTestHelper::saveEntityAlias()
PathautoLocaleTestCase::testLanguageAliases in ./pathauto.test
Test that when an English node is updated, its old English alias is updated and its newer French alias is left intact.
PathautoUnitTestCase::testPathTokens in ./pathauto.test
Test the handling of path vs non-path tokens in pathauto_clean_token_values().

File

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

Class

PathautoTestHelper
Helper test class with some added functions for testing.

Code

function saveEntityAlias($entity_type, $entity, $alias, $language = LANGUAGE_NONE) {
  $uri = entity_uri($entity_type, $entity);
  return $this
    ->saveAlias($uri['path'], $alias, $language);
}