UrlValidator Tests

This commit is contained in:
Suralc
2013-07-29 16:21:07 +02:00
parent 09c5e61462
commit fc1d2af36c
3 changed files with 96 additions and 0 deletions

View File

@@ -54,7 +54,9 @@ class UrlValidator extends Validator
{
parent::init();
if ($this->enableIDN && !function_exists('idn_to_ascii')) {
// @codeCoverageIgnoreStart
throw new InvalidConfigException('In order to use IDN validation intl extension must be installed and enabled.');
// @codeCoverageIgnoreEnd
}
if ($this->message === null) {
$this->message = Yii::t('yii', '{attribute} is not a valid URL.');