Browse Source

fixed exception check in test.

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

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

@ -80,7 +80,7 @@ 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