File tree Expand file tree Collapse file tree 1 file changed +4
-9
lines changed Expand file tree Collapse file tree 1 file changed +4
-9
lines changed Original file line number Diff line number Diff line change @@ -251,9 +251,6 @@ public function testSetContentJsonSerializeError()
251
251
{
252
252
$ this ->expectException (\Exception::class);
253
253
$ this ->expectExceptionMessage ('This error is expected ' );
254
- if (!interface_exists (\JsonSerializable::class, false )) {
255
- $ this ->markTestSkipped ('JsonSerializable is required. ' );
256
- }
257
254
258
255
$ serializable = new JsonSerializableObject ();
259
256
@@ -299,12 +296,10 @@ public function testConstructorWithObjectWithoutToStringMethodThrowsAnException(
299
296
}
300
297
}
301
298
302
- if (interface_exists (\JsonSerializable::class, false )) {
303
- class JsonSerializableObject implements \JsonSerializable
299
+ class JsonSerializableObject implements \JsonSerializable
300
+ {
301
+ public function jsonSerialize (): array
304
302
{
305
- public function jsonSerialize ()
306
- {
307
- throw new \Exception ('This error is expected ' );
308
- }
303
+ throw new \Exception ('This error is expected ' );
309
304
}
310
305
}
You can’t perform that action at this time.
0 commit comments