function PathautoTestHelper::assertTokens in Pathauto 6
Same name and namespace in other branches
- 6.2 pathauto.test \PathautoTestHelper::assertTokens()
4 calls to PathautoTestHelper::assertTokens()
- PathautoBookTokenTestCase::testBookPathAlias in ./
pathauto.test - PathautoTaxonomyTokenTestCase::testCatTokens in ./
pathauto.test - Test the [catpath] and [catalias] tokens.
- PathautoTaxonomyTokenTestCase::testTermTokens in ./
pathauto.test - Test the [termpath] token.
- PathautoTestHelper::assertToken in ./
pathauto.test
File
- ./
pathauto.test, line 26 - Functionality tests for Pathauto.
Class
- PathautoTestHelper
- Helper test class with some added functions for testing.
Code
function assertTokens($type, $object, array $tokens) {
$values = pathauto_get_placeholders($type, $object);
$values = $values['values'];
foreach ($tokens as $token => $expected) {
$this
->assertIdentical($values[$token], $expected, t("Token value for [@token] was '@actual', expected value '@expected'.", array(
'@token' => $token,
'@actual' => $values[$token],
'@expected' => $expected,
)));
}
}