Browse Source

fixed exception check in test.

tags/2.0.0-beta
Qiang Xue 11 years ago
parent
commit
bb6b75e794
  1. 4
      tests/unit/framework/validators/UniqueValidatorTest.php

4
tests/unit/framework/validators/UniqueValidatorTest.php

@ -80,9 +80,9 @@ class UniqueValidatorTest extends DatabaseTestCase
public function testValidateAttributeAttributeNotInTableException() public function testValidateAttributeAttributeNotInTableException()
{ {
$this->setExpectedException('yii\base\InvalidConfigException'); $this->setExpectedException('yii\db\Exception');
$val = new UniqueValidator(); $val = new UniqueValidator();
$m = new ValidatorTestMainModel(); $m = new ValidatorTestMainModel();
$val->validateAttribute($m, 'testMainVal'); $val->validateAttribute($m, 'testMainVal');
} }
} }

Loading…
Cancel
Save