コード例 #1
0
 public function testIsErrorByFieldName()
 {
     $ErrorMessages = getProperty('MailForm', 'ErrorMessages');
     $mailform = new MailForm();
     $this->assertFalse($mailform->isErrorByFieldName('key'));
     $mailform->setErrorMessage('key', MailForm::ERROR_CODE_NOT_NULL_PARAM, "title");
     $this->assertTrue($mailform->isErrorByFieldName('key'));
     $this->assertFalse($mailform->isErrorByFieldName('key1'));
 }