mirror of
https://github.com/yiisoft/yii2.git
synced 2025-12-02 16:09:55 +08:00
25 lines
377 B
PHP
25 lines
377 B
PHP
<?php
|
|
|
|
namespace yiiunit\framework\validators;
|
|
|
|
/**
|
|
* @codeCoverageIgnore
|
|
*/
|
|
class FakedValidationModel
|
|
{
|
|
public $errors = array();
|
|
public function getAttributeLabel($attr)
|
|
{
|
|
return 'Attr-Label: '.$attr;
|
|
}
|
|
|
|
public function addError($attribute, $message)
|
|
{
|
|
$this->errors[$attribute] = $message;
|
|
}
|
|
|
|
public function resetErrors()
|
|
{
|
|
$this->errors = array();
|
|
}
|
|
} |