Esempio n. 1
0
 public function testRegister()
 {
     $entity = new \stdClass();
     $entity->test = 1;
     $entityType = "Test";
     $identifier = 42;
     $this->assertNull($this->entityRegistry->retrieve($entityType, $identifier));
     $this->entityRegistry->register($entityType, $identifier, $entity);
     $this->assertEquals($entity, $this->entityRegistry->retrieve($entityType, $identifier));
     $this->assertTrue($this->entityRegistry->remove($entityType, $identifier));
     $this->assertNull($this->entityRegistry->retrieve($entityType, $identifier));
 }