/** * @test * @author Karsten Dambekalns <*****@*****.**> */ public function unregisterObjectRemovesRegisteredObject() { $object1 = new \stdClass(); $object2 = new \stdClass(); $session = new \F3\FLOW3\Persistence\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.'); }