public function UuidTest::providerUuidInstances in Drupal 8
Same name and namespace in other branches
- 9 core/tests/Drupal/Tests/Component/Uuid/UuidTest.php \Drupal\Tests\Component\Uuid\UuidTest::providerUuidInstances()
Dataprovider for UUID instance tests.
Return value
array
File
- core/
tests/ Drupal/ Tests/ Component/ Uuid/ UuidTest.php, line 42
Class
- UuidTest
- Tests the handling of Universally Unique Identifiers (UUIDs).
Namespace
Drupal\Tests\Component\UuidCode
public function providerUuidInstances() {
$instances = [];
$instances[][] = new Php();
// If valid PECL extensions exists add to list.
if (function_exists('uuid_create') && !function_exists('uuid_make')) {
$instances[][] = new Pecl();
}
// If we are on Windows add the com implementation as well.
if (function_exists('com_create_guid')) {
$instances[][] = new Com();
}
return $instances;
}