Commit 087b7ca9 by Alexander Kochetov

Tests updated

parent 795b7d75
...@@ -91,8 +91,8 @@ class ExistValidatorTest extends DatabaseTestCase ...@@ -91,8 +91,8 @@ class ExistValidatorTest extends DatabaseTestCase
$this->assertTrue($m->hasErrors('a_field')); $this->assertTrue($m->hasErrors('a_field'));
// check array // check array
$val = new ExistValidator(['targetAttribute' => 'ref']); $val = new ExistValidator(['targetAttribute' => 'ref']);
$m = ValidatorTestRefModel::findOne(['id' => 2]); $m = new ValidatorTestRefModel();
$m->test_val = [1, 2, 3]; $m->test_val = [2, 3, 4, 5];
$val->validateAttribute($m, 'test_val'); $val->validateAttribute($m, 'test_val');
$this->assertFalse($m->hasErrors('test_val')); $this->assertFalse($m->hasErrors('test_val'));
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment