public function testReferenceNonReferenceable()
{
$refTestObj = new RefTestPrivateObj();
$refRefTestObj = new NonRefTestObj();
$refTestObj->id = "/functional/refTestObj";
$refRefTestObj->id = "/functional/refRefTestObj";
$refTestObj->setReference($refRefTestObj);
$this->dm->persist($refTestObj);
try {
$this->dm->flush();
} catch (PHPCRException $e) {
$this->assertContains('Referenced document Doctrine\\Tests\\Models\\References\\NonRefTestObj is not referenceable', $e->getMessage());
throw $e;
}
}