public function UuidTest::providerTestValidation in Drupal 8
Same name and namespace in other branches
- 9 core/tests/Drupal/Tests/Component/Uuid/UuidTest.php \Drupal\Tests\Component\Uuid\UuidTest::providerTestValidation()
Dataprovider for UUID instance tests.
Return value
array An array of arrays containing
File
- core/
tests/ Drupal/ Tests/ Component/ Uuid/ UuidTest.php, line 85
Class
- UuidTest
- Tests the handling of Universally Unique Identifiers (UUIDs).
Namespace
Drupal\Tests\Component\UuidCode
public function providerTestValidation() {
return [
// These valid UUIDs.
[
'6ba7b810-9dad-11d1-80b4-00c04fd430c8',
TRUE,
'Basic FQDN UUID did not validate',
],
[
'00000000-0000-0000-0000-000000000000',
TRUE,
'Minimum UUID did not validate',
],
[
'ffffffff-ffff-ffff-ffff-ffffffffffff',
TRUE,
'Maximum UUID did not validate',
],
// These are invalid UUIDs.
[
'0ab26e6b-f074-4e44-9da-601205fa0e976',
FALSE,
'Invalid format was validated',
],
[
'0ab26e6b-f074-4e44-9daf-1205fa0e9761f',
FALSE,
'Invalid length was validated',
],
];
}