public function getRelation($name) { return $this->_modelDefinition->relations->getRelation($name); }
/** * @test */ public function shouldThrowExceptionIfNoRelation() { $model = new Model(array('fields' => array('field1'))); //when try { $model->getRelation('invalid'); $this->fail(); } catch (InvalidArgumentException $e) { } }