You are here

function UUIDTokenFunctionalityTestCase::testDefaultTokens in Universally Unique IDentifier 6

Verify global type token integration.

Expect the token:

  • uuid: an arbitraty generated uuid.

File

./uuid.test, line 697
Functionality tests for UUID module.

Class

UUIDTokenFunctionalityTestCase
Test uuid and token integration.

Code

function testDefaultTokens() {

  // Do not continue if token module is not enabled.
  if (!function_exists('token_replace')) {
    $this
      ->pass(t('Token module is not installed. Skipping this test.'));
    return;
  }

  // Perform a global token replacement for [uuid] token.
  $uuid = token_replace("[uuid]", 'global', NULL);
  $this
    ->assertIsUUID($uuid, t("UUID Token successfully generated."), t("Global tokens"));
}