Beispiel #1
0
 /**
  * @covers Rhumsaa\Uuid\Uuid::isValid
  */
 public function testUsingNilAsValidUuid()
 {
     $this->assertInstanceOf('Rhumsaa\\Uuid\\Uuid', Uuid::uuid3(Uuid::NIL, 'randomtext'));
     $this->assertInstanceOf('Rhumsaa\\Uuid\\Uuid', Uuid::uuid5(Uuid::NIL, 'randomtext'));
 }
 /**
  * The "python.org" UUID is a known entity, so we're testing that this
  * library generates a matching UUID for the same name.
  * @see http://docs.python.org/library/uuid.html
  *
  * @covers Rhumsaa\Uuid\Uuid::uuid3
  * @covers Rhumsaa\Uuid\Uuid::uuidFromHashedName
  */
 public function testUuid3WithNamespaceAsUuidString()
 {
     $uuid = Uuid::uuid3(Uuid::NAMESPACE_DNS, 'python.org');
     $this->assertEquals('6fa459ea-ee8a-3ca4-894e-db77e160355e', $uuid->toString());
     $this->assertEquals(2, $uuid->getVariant());
     $this->assertEquals(3, $uuid->getVersion());
 }