Pheasant\Tests\Relationships\RelationshipTest::testPropertyReferencesResolvedInMapping PHP Method

testPropertyReferencesResolvedInMapping() public method

    public function testPropertyReferencesResolvedInMapping()
    {
        $identity = new SecretIdentity(array('realname' => 'Peter Parker'));
        $hero = new Hero(array('alias' => 'Spider Man'));
        // set the identityid before it's been saved, still null
        $hero->identityid = $identity->id;
        $identity->save();
        $hero->save();
        $this->assertEquals($identity->id, 1);
        $this->assertEquals($hero->identityid, 1);
    }