You are here

public function UuidTest::testGenerateUuid in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/tests/Drupal/Tests/Component/Uuid/UuidTest.php \Drupal\Tests\Component\Uuid\UuidTest::testGenerateUuid()

Tests generating valid UUIDs.

@dataProvider providerUuidInstances

File

core/tests/Drupal/Tests/Component/Uuid/UuidTest.php, line 29
Contains \Drupal\Tests\Component\Uuid\UuidTest.

Class

UuidTest
Tests the handling of Universally Unique Identifiers (UUIDs).

Namespace

Drupal\Tests\Component\Uuid

Code

public function testGenerateUuid(UuidInterface $instance) {
  $this
    ->assertTrue(Uuid::isValid($instance
    ->generate()), sprintf('UUID generation for %s works.', get_class($instance)));
}