public function testCustomErrorsException() { $this->setExpectedException('\\Exception', 'Custom errors must be AV\\Form\\FormError objects'); $this->basic_form_handler->addCustomErrors(array('invalid')); }