public function testFieldWithCustomErrorMessage() { $this->setExpectedException('Stato\\Webflow\\Forms\\ValidationError', 'Plz give me something!'); $f = new Field(array('required' => true, 'error_messages' => array('required' => 'Plz give me something!'))); $f->clean(''); }