1 path_pattern.test PathPatternTestHelper::assertToken($type, $object, $token, $expected)

File

core/modules/path/tests/path_pattern.test, line 32
Functionality tests for automatic path generation.

Class

PathPatternTestHelper
Helper test class with some added functions for testing.

Code

function assertToken($type, $object, $token, $expected) {
  $tokens = token_generate($type, array($token => $token), array($type => $object));
  $tokens += array($token => '');
  $this->assertIdentical($tokens[$token], $expected, format_string("Token value for [@type:@token] was '@actual', expected value '@expected'.", array('@type' => $type, '@token' => $token, '@actual' => $tokens[$token], '@expected' => $expected)));
}