Merge branch 'add-tests' of github.com:suralc/yii2 into add-tests

This commit is contained in:
Suralc
2013-07-31 20:52:52 +02:00
16 changed files with 439 additions and 0 deletions

View File

@@ -82,6 +82,7 @@ class BooleanValidator extends Validator
* @param \yii\base\View $view the view object that is going to be used to render views or view files
* containing a model form with this validator applied.
* @return string the client-side validation script.
* @codeCoverageIgnore
*/
public function clientValidateAttribute($object, $attribute, $view)
{

View File

@@ -97,6 +97,7 @@ class CaptchaValidator extends Validator
* @param \yii\base\View $view the view object that is going to be used to render views or view files
* containing a model form with this validator applied.
* @return string the client-side validation script.
* @codeCoverageIgnore
*/
public function clientValidateAttribute($object, $attribute, $view)
{

View File

@@ -181,6 +181,7 @@ class CompareValidator extends Validator
* @param \yii\base\View $view the view object that is going to be used to render views or view files
* containing a model form with this validator applied.
* @throws InvalidConfigException if CompareValidator::operator is invalid
* @codeCoverageIgnore
*/
public function clientValidateAttribute($object, $attribute, $view)
{

View File

@@ -122,6 +122,7 @@ class EmailValidator extends Validator
* @param \yii\base\View $view the view object that is going to be used to render views or view files
* containing a model form with this validator applied.
* @return string the client-side validation script.
* @codeCoverageIgnore
*/
public function clientValidateAttribute($object, $attribute, $view)
{

View File

@@ -117,6 +117,7 @@ class NumberValidator extends Validator
* @param \yii\base\View $view the view object that is going to be used to render views or view files
* containing a model form with this validator applied.
* @return string the client-side validation script.
* @codeCoverageIgnore
*/
public function clientValidateAttribute($object, $attribute, $view)
{

View File

@@ -84,6 +84,7 @@ class RangeValidator extends Validator
* @param \yii\base\View $view the view object that is going to be used to render views or view files
* containing a model form with this validator applied.
* @return string the client-side validation script.
* @codeCoverageIgnore
*/
public function clientValidateAttribute($object, $attribute, $view)
{

View File

@@ -83,6 +83,7 @@ class RegularExpressionValidator extends Validator
* containing a model form with this validator applied.
* @return string the client-side validation script.
* @throws InvalidConfigException if the "pattern" is not a valid regular expression
* @codeCoverageIgnore
*/
public function clientValidateAttribute($object, $attribute, $view)
{

View File

@@ -105,6 +105,7 @@ class RequiredValidator extends Validator
* @param \yii\base\View $view the view object that is going to be used to render views or view files
* containing a model form with this validator applied.
* @return string the client-side validation script.
* @codeCoverageIgnore
*/
public function clientValidateAttribute($object, $attribute, $view)
{

View File

@@ -145,6 +145,7 @@ class StringValidator extends Validator
* @param \yii\base\View $view the view object that is going to be used to render views or view files
* containing a model form with this validator applied.
* @return string the client-side validation script.
* @codeCoverageIgnore
*/
public function clientValidateAttribute($object, $attribute, $view)
{

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.');
@@ -119,6 +121,7 @@ class UrlValidator extends Validator
* containing a model form with this validator applied.
* @return string the client-side validation script.
* @see \yii\Web\ActiveForm::enableClientValidation
* @codeCoverageIgnore
*/
public function clientValidateAttribute($object, $attribute, $view)
{