You are here

function TokenTestHelper::assertNoTokens in Token 7

File

./token.test, line 57
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,
    )));
  }
  return $values;
}