public function UuidTest::providerTestValidation in Zircon Profile 8
Same name and namespace in other branches
- 8.0 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 90 - Contains \Drupal\Tests\Component\Uuid\UuidTest.
Class
- UuidTest
- Tests the handling of Universally Unique Identifiers (UUIDs).
Namespace
Drupal\Tests\Component\UuidCode
public function providerTestValidation() {
return array(
// These valid UUIDs.
array(
'6ba7b810-9dad-11d1-80b4-00c04fd430c8',
TRUE,
'Basic FQDN UUID did not validate',
),
array(
'00000000-0000-0000-0000-000000000000',
TRUE,
'Minimum UUID did not validate',
),
array(
'ffffffff-ffff-ffff-ffff-ffffffffffff',
TRUE,
'Maximum UUID did not validate',
),
// These are invalid UUIDs.
array(
'0ab26e6b-f074-4e44-9da-601205fa0e976',
FALSE,
'Invalid format was validated',
),
array(
'0ab26e6b-f074-4e44-9daf-1205fa0e9761f',
FALSE,
'Invalid length was validated',
),
);
}