/** * Get the error message associated with a failed validation check. * @see FormValidator::getMessage() * @return string */ function getMessage() { $primaryLocale = Locale::getPrimaryLocale(); $allLocales = Locale::getAllLocales(); //return parent::getMessage() . ' (' . $allLocales[$this->_requiredLocale] . ')'; return parent::getMessage(); //Edited by Anne Ivy Mirasol, April 27, 2011 }
/** * Get the error message associated with a failed validation check. * @return string */ function getMessage() { $primaryLocale = Locale::getPrimaryLocale(); $allLocales = Locale::getAllLocales(); return parent::getMessage() . ' (' . $allLocales[$primaryLocale] . ')'; }
/** * @covers FormValidator::getMessage */ public function testGetMessage() { $formValidator = new FormValidator($this->form, 'testData', FORM_VALIDATOR_REQUIRED_VALUE, 'some.message.key'); self::assertSame('##some.message.key##', $formValidator->getMessage()); }
/** * Get the error message associated with a failed validation check. * @see FormValidator::getMessage() * @return string */ function getMessage() { $allLocales = AppLocale::getAllLocales(); return parent::getMessage() . ' (' . $allLocales[$this->_requiredLocale] . ')'; }
/** * @covers FormValidator::getMessage */ public function testGetMessage() { $formValidator = new FormValidator($this->form, 'testData', FORM_VALIDATOR_REQUIRED_VALUE, 'some.message.key'); self::assertSame('translated string', $formValidator->getMessage()); self::assertSame('some.message.key', Locale::getTestedTranslationKey()); }