You are here

public function UuidTest::testValidation in Drupal 9

Same name and namespace in other branches
  1. 8 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);
}