You are here

function PathautoTokenTestCase::testPathautoTokens in Pathauto 7

File

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

Class

PathautoTokenTestCase
Token functionality tests.

Code

function testPathautoTokens() {
  $array = array(
    'test first arg',
    'The Array / value',
  );
  $tokens = array(
    'join-path' => 'test-first-arg/array-value',
  );
  $data['array'] = $array;
  $replacements = $this
    ->assertTokens('array', $data, $tokens);

  // Ensure that the pathauto_clean_token_values() function does not alter
  // this token value.
  module_load_include('inc', 'pathauto');
  pathauto_clean_token_values($replacements, $data, array());
  $this
    ->assertEqual($replacements['[array:join-path]'], 'test-first-arg/array-value');
}