Skip to content

Commit 6ec7e1e

Browse files
Merge branch '6.1' into 6.2
* 6.1: Relax tests to make them compatible with Mime v6.2+
2 parents 51ab8b1 + 10f4ccb commit 6ec7e1e

File tree

1 file changed

+5
-13
lines changed

1 file changed

+5
-13
lines changed

Tests/Mime/TemplatedEmailTest.php

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -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('[email protected]');
128120
$expected->from('[email protected]');

0 commit comments

Comments
 (0)