Pheasant\Tests\BasicMappingTest::testPropertyReferences PHP Method

testPropertyReferences() public method

    public function testPropertyReferences()
    {
        $post = new Post('first post');
        $future = $post->postid;
        $this->assertTrue(is_object($future));
        $this->assertNull($future->value());
        $this->assertNull($post->get('postid'));
        $post->save();
        $this->assertEquals($post->postid, 1);
        $this->assertEquals($future->value(), 1);
        $this->assertEquals($post->get('postid'), 1);
    }