1 token.test TokenTestHelper::assertNoTokens($type, array $data, array $tokens, array $options = array())

File

core/modules/simpletest/tests/token.test, line 234
Test integration for the token module.

Class

TokenTestHelper
Helper test class with some added functions for testing.

Code

function assertNoTokens($type, array $data, array $tokens, array $options = array()) {
  $input = $this->mapTokenNames($type, $tokens);
  $replacements = token_generate($type, $input, $data, $options);
  foreach ($tokens as $name) {
    $token = $input[$name];
    $this->assertTrue(!isset($replacements[$token]), t("Token value for @token was not generated.", array('@type' => $type, '@token' => $token)));
  }
}