Browse Source

Tests updated

tags/2.0.0-rc
Alexander Kochetov 11 years ago
parent
commit
e791436819
  1. 2
      tests/unit/framework/validators/ExistValidatorTest.php

2
tests/unit/framework/validators/ExistValidatorTest.php

@ -91,9 +91,11 @@ class ExistValidatorTest extends DatabaseTestCase
$this->assertTrue($m->hasErrors('a_field'));
// check array
$val = new ExistValidator(['targetAttribute' => 'ref']);
$val->allowArray = true;
$m = new ValidatorTestRefModel();
$m->test_val = [2, 3, 4, 5];
$val->validateAttribute($m, 'test_val');
var_dump($m->errors);
$this->assertFalse($m->hasErrors('test_val'));
}

Loading…
Cancel
Save