1.20.x path_pattern.test | PathPatternTestHelper::assertAlias($source, $expected_alias, $langcode = LANGUAGE_NONE) |
File
- modules/
path/ tests/ path_pattern.test, line 73 - Functionality tests for automatic path generation.
Class
- PathPatternTestHelper
- Helper test class with some added functions for testing.
Code
function assertAlias($source, $expected_alias, $langcode = LANGUAGE_NONE) {
backdrop_clear_path_cache($source);
$alias = backdrop_get_path_alias($source, $langcode);
$this->assertIdentical($alias, $expected_alias, format_string("Alias for %source with language '@language' was %actual, expected %expected.", array('%source' => $source, '%actual' => $alias, '%expected' => $expected_alias, '@language' => $langcode)));
}