@@ -12,7 +12,7 @@ class RangeTest extends TestCase
12
12
13
13
public function testThrowsConstraintExceptionIfBothMinLimitAndPropertyPath ()
14
14
{
15
- $ this ->expectException (' Symfony\Component\Validator\Exception\ConstraintDefinitionException ' );
15
+ $ this ->expectException (\ Symfony \Component \Validator \Exception \ConstraintDefinitionException::class );
16
16
$ this ->expectExceptionMessage ('requires only one of the "min" or "minPropertyPath" options to be set, not both. ' );
17
17
new Range ([
18
18
'min ' => 'min ' ,
@@ -25,14 +25,14 @@ public function testThrowsConstraintExceptionIfBothMinLimitAndPropertyPath()
25
25
*/
26
26
public function testThrowsConstraintExceptionIfBothMinLimitAndPropertyPathNamed ()
27
27
{
28
- $ this ->expectException (' Symfony\Component\Validator\Exception\ConstraintDefinitionException ' );
28
+ $ this ->expectException (\ Symfony \Component \Validator \Exception \ConstraintDefinitionException::class );
29
29
$ this ->expectExceptionMessage ('requires only one of the "min" or "minPropertyPath" options to be set, not both. ' );
30
30
eval ('new \Symfony\Component\Validator\Constraints\Range(min: "min", minPropertyPath: "minPropertyPath"); ' );
31
31
}
32
32
33
33
public function testThrowsConstraintExceptionIfBothMaxLimitAndPropertyPath ()
34
34
{
35
- $ this ->expectException (' Symfony\Component\Validator\Exception\ConstraintDefinitionException ' );
35
+ $ this ->expectException (\ Symfony \Component \Validator \Exception \ConstraintDefinitionException::class );
36
36
$ this ->expectExceptionMessage ('requires only one of the "max" or "maxPropertyPath" options to be set, not both. ' );
37
37
new Range ([
38
38
'max ' => 'max ' ,
@@ -45,14 +45,14 @@ public function testThrowsConstraintExceptionIfBothMaxLimitAndPropertyPath()
45
45
*/
46
46
public function testThrowsConstraintExceptionIfBothMaxLimitAndPropertyPathNamed ()
47
47
{
48
- $ this ->expectException (' Symfony\Component\Validator\Exception\ConstraintDefinitionException ' );
48
+ $ this ->expectException (\ Symfony \Component \Validator \Exception \ConstraintDefinitionException::class );
49
49
$ this ->expectExceptionMessage ('requires only one of the "max" or "maxPropertyPath" options to be set, not both. ' );
50
50
eval ('new \Symfony\Component\Validator\Constraints\Range(max: "max", maxPropertyPath: "maxPropertyPath"); ' );
51
51
}
52
52
53
53
public function testThrowsConstraintExceptionIfNoLimitNorPropertyPath ()
54
54
{
55
- $ this ->expectException (' Symfony\Component\Validator\Exception\MissingOptionsException ' );
55
+ $ this ->expectException (\ Symfony \Component \Validator \Exception \MissingOptionsException::class );
56
56
$ this ->expectExceptionMessage ('Either option "min", "minPropertyPath", "max" or "maxPropertyPath" must be given ' );
57
57
new Range ([]);
58
58
}
0 commit comments