public function getError($field) { if (!isset($this->errors[$field])) { throw new InvalidFieldException($field); } return $this->errors[$field]; }
/** * @expectedException \Fuel\Validation\InvalidFieldException */ public function testGetInvalidError() { $this->object->getError('test'); }