function UuidTest::providerUuidInstances
Same name in other branches
- 9 core/tests/Drupal/Tests/Component/Uuid/UuidTest.php \Drupal\Tests\Component\Uuid\UuidTest::providerUuidInstances()
- 10 core/tests/Drupal/Tests/Component/Uuid/UuidTest.php \Drupal\Tests\Component\Uuid\UuidTest::providerUuidInstances()
- 11.x 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;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.