function UuidTest::testValidation

Same name in other branches
  1. 8.9.x core/tests/Drupal/Tests/Component/Uuid/UuidTest.php \Drupal\Tests\Component\Uuid\UuidTest::testValidation()
  2. 10 core/tests/Drupal/Tests/Component/Uuid/UuidTest.php \Drupal\Tests\Component\Uuid\UuidTest::testValidation()
  3. 11.x core/tests/Drupal/Tests/Component/Uuid/UuidTest.php \Drupal\Tests\Component\Uuid\UuidTest::testValidation()

Tests UUID validation.

@dataProvider providerTestValidation

Parameters

string $uuid: The uuid to check against.

bool $is_valid: Whether the uuid is valid or not.

string $message: The message to display on failure.

File

core/tests/Drupal/Tests/Component/Uuid/UuidTest.php, line 72

Class

UuidTest
Tests the handling of Universally Unique Identifiers (UUIDs).

Namespace

Drupal\Tests\Component\Uuid

Code

public function testValidation($uuid, $is_valid, $message) {
    $this->assertSame($is_valid, Uuid::isValid($uuid), $message);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.