@@ -11,7 +11,8 @@ public function testTnefEmail1(): void
1111 {
1212 $ domxpath = $ this ->renderMessage ('631a672e15f742a98035f1cb7efe1f8db6310138@example.net ' );
1313
14- $ this ->assertSame ('' , $ this ->getBody ($ domxpath ));
14+ $ bodyParts = $ domxpath ->query ('//iframe[contains(@class, "framed-message-part")] ' );
15+ $ this ->assertCount (0 , $ bodyParts , 'Message body parts ' );
1516
1617 $ attchNames = $ domxpath ->query ('//span[@class="attachment-name"] ' );
1718 $ this ->assertCount (1 , $ attchNames , 'Attachments ' );
@@ -22,7 +23,13 @@ public function testTnefEmail2(): void
2223 {
2324 $ domxpath = $ this ->renderMessage ('b6057653610f8041b120965652ff7f26a1a8f02d@example.net ' );
2425
25- $ this ->assertStringStartsWith ('THE BILL OF RIGHTSAmendments 1-10 of the ' , $ this ->getBody ($ domxpath ));
26+ $ bodyParts = $ domxpath ->query ('//iframe[contains(@class, "framed-message-part")] ' );
27+ $ this ->assertCount (1 , $ bodyParts , 'Message body parts ' );
28+ $ params = $ this ->getSrcParams ($ bodyParts [0 ]);
29+ $ this ->assertSrcUrlParams ($ params , 'winmail.1.html ' );
30+ $ body = $ this ->getIframedContent ($ params );
31+
32+ $ this ->assertStringStartsWith ('THE BILL OF RIGHTSAmendments 1-10 of the ' , trim ($ body ));
2633
2734 $ attchNames = $ domxpath ->query ('//span[@class="attachment-name"] ' );
2835 $ this ->assertCount (0 , $ attchNames , 'Attachments ' );
@@ -32,7 +39,13 @@ public function testTnefEmail3(): void
3239 {
3340 $ domxpath = $ this ->renderMessage ('cde7964538f283305609ec9146b4a80c121fd0ae@example.net ' );
3441
35- $ bodyParagraphs = $ domxpath ->query ('//div[@class="rcmBody"]/p ' );
42+ $ bodyParts = $ domxpath ->query ('//iframe[contains(@class, "framed-message-part")] ' );
43+ $ this ->assertCount (1 , $ bodyParts , 'Message body parts ' );
44+ $ params = $ this ->getSrcParams ($ bodyParts [0 ]);
45+ $ this ->assertSrcUrlParams ($ params , 'winmail.1.html ' );
46+ $ domxpath_body = $ this ->renderIframedBodyContent ($ params );
47+
48+ $ bodyParagraphs = $ domxpath_body ->query ('//p ' );
3649 $ this ->assertCount (8 , $ bodyParagraphs , 'Body HTML paragraphs ' );
3750 $ this ->assertSame ('Casdasdfasdfasd ' , $ bodyParagraphs [0 ]->textContent );
3851 $ this ->assertSame ('Casdasdfasdfasd ' , $ bodyParagraphs [1 ]->textContent );
0 commit comments