public function testFieldHasValidatorError() { $this->mock_validator->expects($this->any())->method('fieldHasError')->will($this->returnValue(true)); $this->basic_form_handler->setValidator($this->mock_validator); $this->basic_form_handler->handleRequest(); $this->assertTrue($this->basic_form_handler->fieldHasError('name')); }