mirror of
https://github.com/yiisoft/yii2.git
synced 2025-08-19 01:34:44 +08:00
Tests updated
This commit is contained in:
@ -91,8 +91,8 @@ class ExistValidatorTest extends DatabaseTestCase
|
||||
$this->assertTrue($m->hasErrors('a_field'));
|
||||
// check array
|
||||
$val = new ExistValidator(['targetAttribute' => 'ref']);
|
||||
$m = ValidatorTestRefModel::findOne(['id' => 2]);
|
||||
$m->test_val = [1, 2, 3];
|
||||
$m = new ValidatorTestRefModel();
|
||||
$m->test_val = [2, 3, 4, 5];
|
||||
$val->validateAttribute($m, 'test_val');
|
||||
$this->assertFalse($m->hasErrors('test_val'));
|
||||
}
|
||||
|
Reference in New Issue
Block a user