function PathautoUnitTestCase::testPathAliasUniquifyWordsafe in Pathauto 7
Same name and namespace in other branches
- 6.2 pathauto.test \PathautoUnitTestCase::testPathAliasUniquifyWordsafe()
File
- ./
pathauto.test, line 392 - Functionality tests for Pathauto.
Class
- PathautoUnitTestCase
- Unit tests for Pathauto functions.
Code
function testPathAliasUniquifyWordsafe() {
variable_set('pathauto_max_length', 25);
$node_1 = $this
->drupalCreateNode(array(
'title' => 'thequick brownfox jumpedover thelazydog',
'type' => 'page',
));
$node_2 = $this
->drupalCreateNode(array(
'title' => 'thequick brownfox jumpedover thelazydog',
'type' => 'page',
));
// Check that pathauto_alias_uniquify is calling truncate_utf8 with $wordsafe param set to TRUE.
// If it doesn't path alias result would be content/thequick-brownf-0
$this
->assertEntityAlias('node', $node_1, 'content/thequick-brownfox');
$this
->assertEntityAlias('node', $node_2, 'content/thequick-0');
}