function UuidTest::testUuidIsUnique
Same name in other branches
- 9 core/tests/Drupal/Tests/Component/Uuid/UuidTest.php \Drupal\Tests\Component\Uuid\UuidTest::testUuidIsUnique()
- 8.9.x core/tests/Drupal/Tests/Component/Uuid/UuidTest.php \Drupal\Tests\Component\Uuid\UuidTest::testUuidIsUnique()
- 11.x core/tests/Drupal/Tests/Component/Uuid/UuidTest.php \Drupal\Tests\Component\Uuid\UuidTest::testUuidIsUnique()
Tests that generated UUIDs are unique.
@dataProvider providerUuidInstances
File
-
core/
tests/ Drupal/ Tests/ Component/ Uuid/ UuidTest.php, line 35
Class
- UuidTest
- Tests the handling of Universally Unique Identifiers (UUIDs).
Namespace
Drupal\Tests\Component\UuidCode
public function testUuidIsUnique(UuidInterface $instance) : void {
$this->assertNotEquals($instance->generate(), $instance->generate(), sprintf('Same UUID was not generated twice with %s.', get_class($instance)));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.