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 @@ -224,9 +224,6 @@ public function testSetContentJsonSerializeError()
224224 {
225225 $ this ->expectException (\Exception::class);
226226 $ this ->expectExceptionMessage ('This error is expected ' );
227- if (!interface_exists (\JsonSerializable::class, false )) {
228- $ this ->markTestSkipped ('JsonSerializable is required. ' );
229- }
230227
231228 $ serializable = new JsonSerializableObject ();
232229
@@ -280,12 +277,10 @@ public function testConstructorWithObjectWithoutToStringMethodThrowsAnException(
280277 }
281278}
282279
283- if (interface_exists (\JsonSerializable::class, false )) {
284- class JsonSerializableObject implements \JsonSerializable
280+ class JsonSerializableObject implements \JsonSerializable
281+ {
282+ public function jsonSerialize (): array
285283 {
286- public function jsonSerialize ()
287- {
288- throw new \Exception ('This error is expected ' );
289- }
284+ throw new \Exception ('This error is expected ' );
290285 }
291286}
You can’t perform that action at this time.
0 commit comments