You are here

function UUIDTestHelper::assertIsUUID in Universally Unique IDentifier 6

Verify the argument is a valid uuid and performs validation.

Parameters

string $uuid: string to be validated as uuid.

string $message: Message to show in this assertion.

string $group: Name of the group for this assertion.

5 calls to UUIDTestHelper::assertIsUUID()
UUIDFunctionalityTestCase::testChangedSettingNodeUUID in ./uuid.test
Verify uuid behavior with changed settings. All settings are forced to disabled, then a node is created (with no UUID). Then settings are enabled, and the node is resaved, which should trigger UUIDs being created.
UUIDFunctionalityTestCase::testEnabledNodeUUID in ./uuid.test
Verify uuid behavior for nodes.
UUIDFunctionalityTestCase::testEnabledNodeUUIDFormEdit in ./uuid.test
Verify uuid behavior when edititng via node form. http://drupal.org/node/1065364
UUIDFunctionalityTestCase::testEnabledUserUUID in ./uuid.test
Verify uuid behavior for users.
UUIDTokenFunctionalityTestCase::testDefaultTokens in ./uuid.test
Verify global type token integration.

File

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

Class

UUIDTestHelper
Helper test class with some added functions for testing.

Code

function assertIsUUID($uuid, $message = NULL, $group = NULL) {
  $this
    ->assertNotNull($uuid, t("Value is not null"), $group);
  $this
    ->assertTrue(uuid_is_valid($uuid), $message, $group);
}