@@ -74,17 +74,9 @@ public function testSymfonySerialize()
7474 "html": null,
7575 "htmlCharset": null,
7676 "attachments": [
77- {
78- "filename": "test.txt",
79- "mediaType": "application",
80- "body": "Some Text file",
81- "charset": null,
82- "subtype": "octet-stream",
83- "disposition": "attachment",
84- "name": "test.txt",
85- "encoding": "base64",
86- "headers": [],
87- "class": "Symfony\\\Component\\\Mime\\\Part\\\DataPart"
77+ {%A
78+ "body": "Some Text file",%A
79+ "name": "test.txt",%A
8880 }
8981 ],
9082 "headers": {
@@ -118,11 +110,11 @@ public function testSymfonySerialize()
118110 ], [new JsonEncoder ()]);
119111
120112 $ serialized = $ serializer ->serialize ($ e , 'json ' , [ObjectNormalizer::IGNORED_ATTRIBUTES => ['cachedBody ' ]]);
121- $ this ->assertSame ($ expectedJson , json_encode (json_decode ($ serialized ), \JSON_PRETTY_PRINT | \JSON_UNESCAPED_SLASHES ));
113+ $ this ->assertStringMatchesFormat ($ expectedJson , json_encode (json_decode ($ serialized ), \JSON_PRETTY_PRINT | \JSON_UNESCAPED_SLASHES ));
122114
123115 $ n = $ serializer ->deserialize ($ serialized , TemplatedEmail::class, 'json ' );
124116 $ serialized = $ serializer ->serialize ($ e , 'json ' , [ObjectNormalizer::IGNORED_ATTRIBUTES => ['cachedBody ' ]]);
125- $ this ->assertSame ($ expectedJson , json_encode (json_decode ($ serialized ), \JSON_PRETTY_PRINT | \JSON_UNESCAPED_SLASHES ));
117+ $ this ->assertStringMatchesFormat ($ expectedJson , json_encode (json_decode ($ serialized ), \JSON_PRETTY_PRINT | \JSON_UNESCAPED_SLASHES ));
126118
127119 $ n ->from ('fabien@symfony.com ' );
128120 $ expected ->from ('fabien@symfony.com ' );
0 commit comments