File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed
src/Symfony/Component/Validator Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change 1
1
CHANGELOG
2
2
=========
3
3
4
+ 5.3.0
5
+ -----
6
+
7
+ * added the ` normalizer ` option to ` Unique ` Constraint
8
+
4
9
5.2.0
5
10
-----
6
11
7
- * added the ` valueNormalizer ` option to ` Unique ` Constraint
8
12
* added a ` Cascade ` constraint to ease validating nested typed object properties
9
13
* deprecated the ` allowEmptyString ` option of the ` Length ` constraint
10
14
Original file line number Diff line number Diff line change 13
13
14
14
use PHPUnit \Framework \TestCase ;
15
15
use Symfony \Component \Validator \Constraints \Unique ;
16
+ use Symfony \Component \Validator \Exception \InvalidArgumentException ;
16
17
use Symfony \Component \Validator \Mapping \ClassMetadata ;
17
18
use Symfony \Component \Validator \Mapping \Loader \AnnotationLoader ;
18
19
@@ -38,14 +39,14 @@ public function testAttributes()
38
39
39
40
public function testInvalidNormalizerThrowsException ()
40
41
{
41
- $ this ->expectException (' Symfony\Component\Validator\Exception\ InvalidArgumentException' );
42
+ $ this ->expectException (InvalidArgumentException::class );
42
43
$ this ->expectExceptionMessage ('The "normalizer" option must be a valid callable ("string" given). ' );
43
44
new Unique (['normalizer ' => 'Unknown Callable ' ]);
44
45
}
45
46
46
47
public function testInvalidNormalizerObjectThrowsException ()
47
48
{
48
- $ this ->expectException (' Symfony\Component\Validator\Exception\ InvalidArgumentException' );
49
+ $ this ->expectException (InvalidArgumentException::class );
49
50
$ this ->expectExceptionMessage ('The "normalizer" option must be a valid callable ("stdClass" given). ' );
50
51
new Unique (['normalizer ' => new \stdClass ()]);
51
52
}
You can’t perform that action at this time.
0 commit comments