Commit e7914368 by Alexander Kochetov

Tests updated

parent 3e94b248
...@@ -91,9 +91,11 @@ class ExistValidatorTest extends DatabaseTestCase ...@@ -91,9 +91,11 @@ 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']);
$val->allowArray = true;
$m = new ValidatorTestRefModel(); $m = new ValidatorTestRefModel();
$m->test_val = [2, 3, 4, 5]; $m->test_val = [2, 3, 4, 5];
$val->validateAttribute($m, 'test_val'); $val->validateAttribute($m, 'test_val');
var_dump($m->errors);
$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