lithium\tests\cases\data\ModelTest::testFieldName PHP Method

testFieldName() public method

public testFieldName ( )
    public function testFieldName()
    {
        MockPost::bind('hasMany', 'MockTag');
        $relation = MockPost::relations('MockComment');
        $this->assertEqual('mock_comments', $relation->fieldName());
        $relation = MockPost::relations('MockTag');
        $this->assertEqual('mock_tags', $relation->fieldName());
        $relation = MockComment::relations('MockPost');
        $this->assertEqual('mock_post', $relation->fieldName());
    }
ModelTest