public function testGetGuid()
 {
     $guidGen = new V4GuidGenerator();
     $firstGuid = $guidGen->newGuid();
     $secondGuid = $guidGen->newGuid();
     $this->assertInternalType('string', $firstGuid);
     $this->assertInternalType('string', $secondGuid);
     $this->assertNotSame($firstGuid, $secondGuid);
 }
Esempio n. 2
0
 /**
  * Generates and returns a GUID for a statement in the given Entity.
  *
  * @since 1.0
  *
  * @param EntityId $entityId
  *
  * @return string
  */
 public function newGuid(EntityId $entityId)
 {
     return $entityId->getSerialization() . StatementGuid::SEPARATOR . $this->baseGenerator->newGuid();
 }