public function testRemoveReferrer()
{
$refTestObj = new RefTestObj();
$refRefTestObj = new RefRefTestObj();
$refTestObj->id = "/functional/refTestObj";
$refRefTestObj->id = "/functional/refRefTestObj";
$refRefTestObj->name = "referenced";
$refTestObj->reference = $refRefTestObj;
$this->dm->persist($refTestObj);
$this->dm->flush();
$this->dm->clear();
$referrer = $this->dm->find($this->referrerType, '/functional/refTestObj');
$this->dm->remove($referrer);
$this->dm->flush();
$this->dm->clear();
$testReferrer = $this->dm->find($this->referrerType, '/functional/refTestObj');
$this->assertNull($testReferrer);
$this->assertTrue($this->session->getNode('/functional')->hasNode('refRefTestObj'));
$this->assertFalse($this->session->getNode('/functional')->hasNode('refTestObj'));
}