File tree 1 file changed +6
-8
lines changed 1 file changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -17,10 +17,9 @@ class UnionTypesTest extends \PHPUnit\Framework\TestCase
17
17
*/
18
18
public function testMapUnionNative ()
19
19
{
20
- $ this ->expectException (
21
- JsonMapper_Exception::class,
22
- 'Cannot decide which of the union types shall be used: \DateTime|string '
23
- );
20
+ $ this ->expectException (JsonMapper_Exception::class);
21
+ $ this ->expectExceptionMessage ('Cannot decide which of the union types shall be used: \DateTime|string ' );
22
+
24
23
$ jm = new JsonMapper ();
25
24
$ sn = $ jm ->map (
26
25
json_decode ('{"dateOrStringNative":"stringvalue"} ' ),
@@ -33,10 +32,9 @@ public function testMapUnionNative()
33
32
*/
34
33
public function testMapUnionDocblock ()
35
34
{
36
- $ this ->expectException (
37
- JsonMapper_Exception::class,
38
- 'Cannot decide which of the union types shall be used: \DateTime|string '
39
- );
35
+ $ this ->expectException (JsonMapper_Exception::class);
36
+ $ this ->expectExceptionMessage ('Cannot decide which of the union types shall be used: DateTime|string ' );
37
+
40
38
$ jm = new JsonMapper ();
41
39
$ sn = $ jm ->map (
42
40
json_decode ('{"dateOrStringDocblock":"stringvalue"} ' ),
You can’t perform that action at this time.
0 commit comments