lithium\tests\cases\data\model\RelationshipTest::testEmptyToAndName PHP Method

testEmptyToAndName() public method

public testEmptyToAndName ( )
    public function testEmptyToAndName()
    {
        $expected = "/`'to'` and `'name'` options can't both be empty./";
        $gallery = $this->_gallery;
        $this->assertException($expected, function () use($gallery) {
            new Relationship(array('from' => $gallery, 'type' => 'belongsTo', 'fieldName' => 'field_id'));
        });
    }