Skip to content

Commit 9caa651

Browse files
committed
use real html log instead of body param
1 parent 3d64370 commit 9caa651

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

src/_support/Helper/PimcoreBackend.php

+2-9
Original file line numberDiff line numberDiff line change
@@ -972,16 +972,9 @@ public function seeInRenderedEmailBody(Document\Email $mail, string $string)
972972
$foundEmails = $this->getEmailsFromDocumentIds([$mail->getId()]);
973973
$this->assertGreaterThan(0, count($foundEmails));
974974

975-
$serializer = $this->getSerializer();
976-
977975
foreach ($foundEmails as $email) {
978-
$params = $serializer->decode($email->getParams(), 'json', ['json_decode_associative' => true]);
979-
980-
$bodyKey = array_search('body', array_column($params, 'key'));
981-
$this->assertNotSame(false, $bodyKey);
982-
983-
$data = $params[$bodyKey];
984-
$this->assertContains($string, $data['data']['value']);
976+
$bodyHtml = $email->getHtmlLog();
977+
$this->assertContains($string, $bodyHtml);
985978
}
986979
}
987980

0 commit comments

Comments
 (0)