function UuidTest::providerTestValidation
Data provider for UUID instance tests.
Return value
array An array of arrays containing
File
- 
              core/
tests/ Drupal/ Tests/ Component/ Uuid/ UuidTest.php, line 87  
Class
- UuidTest
 - Tests the handling of Universally Unique Identifiers (UUIDs).
 
Namespace
Drupal\Tests\Component\UuidCode
public static 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',
    ],
  ];
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.