File tree Expand file tree Collapse file tree 2 files changed +5
-10
lines changed
Serializer/Tests/Fixtures Expand file tree Collapse file tree 2 files changed +5
-10
lines changed Original file line number Diff line number Diff line change @@ -224,9 +224,6 @@ public function testSetContentJsonSerializeError()
224
224
{
225
225
$ this ->expectException (\Exception::class);
226
226
$ this ->expectExceptionMessage ('This error is expected ' );
227
- if (!interface_exists (\JsonSerializable::class, false )) {
228
- $ this ->markTestSkipped ('JsonSerializable is required. ' );
229
- }
230
227
231
228
$ serializable = new JsonSerializableObject ();
232
229
@@ -280,12 +277,10 @@ public function testConstructorWithObjectWithoutToStringMethodThrowsAnException(
280
277
}
281
278
}
282
279
283
- if (interface_exists (\JsonSerializable::class, false )) {
284
- class JsonSerializableObject implements \JsonSerializable
280
+ class JsonSerializableObject implements \JsonSerializable
281
+ {
282
+ public function jsonSerialize (): array
285
283
{
286
- public function jsonSerialize ()
287
- {
288
- throw new \Exception ('This error is expected ' );
289
- }
284
+ throw new \Exception ('This error is expected ' );
290
285
}
291
286
}
Original file line number Diff line number Diff line change 13
13
14
14
class JsonSerializableDummy implements \JsonSerializable
15
15
{
16
- public function jsonSerialize ()
16
+ public function jsonSerialize (): array
17
17
{
18
18
return [
19
19
'foo ' => 'a ' ,
You can’t perform that action at this time.
0 commit comments