コード例 #1
0
ファイル: UuidTest.php プロジェクト: drickferreira/rastreador
 public function testCorrectTimeOfImportedUuid()
 {
     $uuidOne = Uuid::generate(1);
     $importedOne = Uuid::import((string) $uuidOne);
     $this->assertEquals($uuidOne->time, $importedOne->time);
     $uuidThree = Uuid::generate(3, 'example.com', Uuid::NS_DNS);
     $importedThree = Uuid::import((string) $uuidThree);
     $this->assertEmpty($importedThree->time);
     $uuidFour = Uuid::generate(4);
     $importedFour = Uuid::import((string) $uuidFour);
     $this->assertEmpty($importedFour->time);
     $uuidFive = Uuid::generate(5, 'example.com', Uuid::NS_DNS);
     $importedFive = Uuid::import((string) $uuidFive);
     $this->assertEmpty($importedFive->time);
 }