public function testGetErrorMessage() { $mailform = new MailForm(); $this->assertEquals('', $mailform->getErrorMessage()); $mailform->setErrorMessage('key1', MailForm::ERROR_CODE_NOT_NULL_PARAM, "title1"); $this->assertEquals('\\n「title1」は必ず入力してください。', $mailform->getErrorMessage()); $mailform->setErrorMessage('key2', MailForm::ERROR_CODE_NOT_NULL_PARAM, "title2"); $this->assertEquals('\\n「title1」は必ず入力してください。\\n「title2」は必ず入力してください。', $mailform->getErrorMessage()); }