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'));
});
}