You are here

function PathautoTestHelper::saveAlias in Pathauto 6

Same name and namespace in other branches
  1. 6.2 pathauto.test \PathautoTestHelper::saveAlias()
  2. 7 pathauto.test \PathautoTestHelper::saveAlias()
2 calls to PathautoTestHelper::saveAlias()
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.
PathautoTestHelper::saveEntityAlias in ./pathauto.test

File

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

Class

PathautoTestHelper
Helper test class with some added functions for testing.

Code

function saveAlias($source, $alias, $language = '') {
  path_set_alias($source, $alias, NULL, $language);
  return db_fetch_array(db_query_range("SELECT * FROM {url_alias} WHERE src = '%s' AND dst = '%s' AND language = '%s' ORDER BY pid DESC", $source, $alias, $language, 0, 1));
}