Skip to content

Commit 10f4ccb

Browse files
Relax tests to make them compatible with Mime v6.2+
1 parent 368e9ba commit 10f4ccb

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

Tests/Mime/TemplatedEmailTest.php

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -73,11 +73,9 @@ public function testSymfonySerialize()
7373
"html": null,
7474
"htmlCharset": null,
7575
"attachments": [
76-
{
77-
"body": "Some Text file",
78-
"name": "test.txt",
79-
"content-type": null,
80-
"inline": false
76+
{%A
77+
"body": "Some Text file",%A
78+
"name": "test.txt",%A
8179
}
8280
],
8381
"headers": {
@@ -111,11 +109,11 @@ public function testSymfonySerialize()
111109
], [new JsonEncoder()]);
112110

113111
$serialized = $serializer->serialize($e, 'json', [ObjectNormalizer::IGNORED_ATTRIBUTES => ['cachedBody']]);
114-
$this->assertSame($expectedJson, json_encode(json_decode($serialized), \JSON_PRETTY_PRINT | \JSON_UNESCAPED_SLASHES));
112+
$this->assertStringMatchesFormat($expectedJson, json_encode(json_decode($serialized), \JSON_PRETTY_PRINT | \JSON_UNESCAPED_SLASHES));
115113

116114
$n = $serializer->deserialize($serialized, TemplatedEmail::class, 'json');
117115
$serialized = $serializer->serialize($e, 'json', [ObjectNormalizer::IGNORED_ATTRIBUTES => ['cachedBody']]);
118-
$this->assertSame($expectedJson, json_encode(json_decode($serialized), \JSON_PRETTY_PRINT | \JSON_UNESCAPED_SLASHES));
116+
$this->assertStringMatchesFormat($expectedJson, json_encode(json_decode($serialized), \JSON_PRETTY_PRINT | \JSON_UNESCAPED_SLASHES));
119117

120118
$n->from('[email protected]');
121119
$expected->from('[email protected]');

0 commit comments

Comments
 (0)