Doctrine\Tests\ODM\PHPCR\Functional\ReferenceTest::testCreateOneArrayError PHP Method

testCreateOneArrayError() public method

    public function testCreateOneArrayError()
    {
        $refTestObj = new RefTestObj();
        $refRefTestObj = new RefRefTestObj();
        $refTestObj->id = "/functional/refTestObj";
        $refRefTestObj->id = "/functional/refRefTestObj";
        $refRefTestObj->name = "referenced";
        $refTestObj->reference = array($refRefTestObj);
        $this->dm->persist($refTestObj);
        try {
            $this->dm->flush();
        } catch (PHPCRException $e) {
            $this->assertContains('Referenced document is not stored correctly in a reference-one property.', $e->getMessage());
            throw $e;
        }
    }