Commit 795b7d75 by Alexander Kochetov

Tests updated

parent ba767206
...@@ -92,9 +92,9 @@ class ExistValidatorTest extends DatabaseTestCase ...@@ -92,9 +92,9 @@ class ExistValidatorTest extends DatabaseTestCase
// check array // check array
$val = new ExistValidator(['targetAttribute' => 'ref']); $val = new ExistValidator(['targetAttribute' => 'ref']);
$m = ValidatorTestRefModel::findOne(['id' => 2]); $m = ValidatorTestRefModel::findOne(['id' => 2]);
$m->test_val = [1, 2, 3, 4, 5, 6]; $m->test_val = [1, 2, 3];
$val->validateAttribute($m, 'test_val'); $val->validateAttribute($m, 'test_val');
$this->assertTrue($m->hasErrors('test_val')); $this->assertFalse($m->hasErrors('test_val'));
} }
public function testValidateCompositeKeys() public function testValidateCompositeKeys()
......
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