public function UuidTest::testValidation in Drupal 10
Same name and namespace in other branches
- 8 core/tests/Drupal/Tests/Component/Uuid/UuidTest.php \Drupal\Tests\Component\Uuid\UuidTest::testValidation()
- 9 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\UuidCode
public function testValidation($uuid, $is_valid, $message) {
$this
->assertSame($is_valid, Uuid::isValid($uuid), $message);
}