unregisterObject() public method

Unregister an object
public unregisterObject ( string $object ) : void
$object string
return void
 /**
  * Iterate over deleted entities and process them
  *
  * @return void
  */
 protected function processDeletedObjects()
 {
     foreach ($this->deletedEntities as $entity) {
         if ($this->persistenceSession->hasObject($entity)) {
             $this->removeEntity($entity);
             $this->persistenceSession->unregisterReconstitutedEntity($entity);
             $this->persistenceSession->unregisterObject($entity);
         }
     }
     $this->deletedEntities = new \SplObjectStorage();
 }
 /**
  * @test
  */
 public function unregisterObjectRemovesRegisteredObject()
 {
     $object1 = new \stdClass();
     $object2 = new \stdClass();
     $session = new Persistence\Generic\Session();
     $session->registerObject($object1, 12345);
     $session->registerObject($object2, 67890);
     $this->assertTrue($session->hasObject($object1), 'Session claims it does not have registered object.');
     $this->assertTrue($session->hasIdentifier('12345'), 'Session claims it does not have registered object.');
     $this->assertTrue($session->hasObject($object1), 'Session claims it does not have registered object.');
     $this->assertTrue($session->hasIdentifier('67890'), 'Session claims it does not have registered object.');
     $session->unregisterObject($object1);
     $this->assertFalse($session->hasObject($object1), 'Session claims it does have unregistered object.');
     $this->assertFalse($session->hasIdentifier('12345'), 'Session claims it does not have registered object.');
     $this->assertTrue($session->hasObject($object2), 'Session claims it does not have registered object.');
     $this->assertTrue($session->hasIdentifier('67890'), 'Session claims it does not have registered object.');
 }