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()
251251 {
252252 $ this ->expectException (\Exception::class);
253253 $ this ->expectExceptionMessage ('This error is expected ' );
254- if (!interface_exists (\JsonSerializable::class, false )) {
255- $ this ->markTestSkipped ('JsonSerializable is required. ' );
256- }
257254
258255 $ serializable = new JsonSerializableObject ();
259256
@@ -299,12 +296,10 @@ public function testConstructorWithObjectWithoutToStringMethodThrowsAnException(
299296 }
300297}
301298
302- if (interface_exists (\JsonSerializable::class, false )) {
303- class JsonSerializableObject implements \JsonSerializable
299+ class JsonSerializableObject implements \JsonSerializable
300+ {
301+ public function jsonSerialize (): array
304302 {
305- public function jsonSerialize ()
306- {
307- throw new \Exception ('This error is expected ' );
308- }
303+ throw new \Exception ('This error is expected ' );
309304 }
310305}
You can’t perform that action at this time.
0 commit comments