File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change 14
14
use PHPUnit \Framework \TestCase ;
15
15
use Symfony \Component \Validator \Constraints \AtLeastOneOf ;
16
16
use Symfony \Component \Validator \Constraints \Valid ;
17
+ use Symfony \Component \Validator \Exception \ConstraintDefinitionException ;
17
18
18
19
/**
19
20
* @author Przemysław Bogusz <[email protected] >
@@ -22,15 +23,15 @@ class AtLeastOneOfTest extends TestCase
22
23
{
23
24
public function testRejectNonConstraints ()
24
25
{
25
- $ this ->expectException (\ Symfony \ Component \ Validator \ Exception \ ConstraintDefinitionException::class);
26
+ $ this ->expectException (ConstraintDefinitionException::class);
26
27
new AtLeastOneOf ([
27
28
'foo ' ,
28
29
]);
29
30
}
30
31
31
32
public function testRejectValidConstraint ()
32
33
{
33
- $ this ->expectException (\ Symfony \ Component \ Validator \ Exception \ ConstraintDefinitionException::class);
34
+ $ this ->expectException (ConstraintDefinitionException::class);
34
35
new AtLeastOneOf ([
35
36
new Valid (),
36
37
]);
Original file line number Diff line number Diff line change 13
13
14
14
use Symfony \Component \Validator \Constraints \Hostname ;
15
15
use Symfony \Component \Validator \Constraints \HostnameValidator ;
16
+ use Symfony \Component \Validator \Exception \UnexpectedValueException ;
16
17
use Symfony \Component \Validator \Test \ConstraintValidatorTestCase ;
17
18
18
19
/**
@@ -36,7 +37,7 @@ public function testEmptyStringIsValid()
36
37
37
38
public function testExpectsStringCompatibleType ()
38
39
{
39
- $ this ->expectException (\ Symfony \ Component \ Validator \ Exception \ UnexpectedValueException::class);
40
+ $ this ->expectException (UnexpectedValueException::class);
40
41
41
42
$ this ->validator ->validate (new \stdClass (), new Hostname ());
42
43
}
You can’t perform that action at this time.
0 commit comments