Checking that relation type is correct
public static relationType ( string $type ) : boolean | ||
$type | string | |
return | boolean | relation type |
/** * Set relation type to field * @param string $relation Name of relation */ protected function setRelationType($relation) { Validate::relationType($relation); $this->relationType = $relation; }
/** * @covers Lazer\Classes\Helpers\Validate::relationType * @expectedException Lazer\Classes\LazerException */ public function testRelationTypeNotExists() { $this->object->relationType('someRelation'); }