@@ -58,7 +58,7 @@ public function testEmailConfirmation(): void
58
58
$ this ->assertContains (
59
59
'/newsletter/subscriber/confirm/id/ ' . $ subscriber ->getSubscriberId ()
60
60
. '/code/ysayquyajua23iq29gxwu2eax2qb6gvy ' ,
61
- $ this ->transportBuilder ->getSentMessage ()->getBody ()-> getParts ()[ 0 ]-> getRawContent ()
61
+ $ this ->transportBuilder ->getSentMessage ()->getRawMessage ()
62
62
);
63
63
$ this ->assertEquals (Subscriber::STATUS_NOT_ACTIVE , $ subscriber ->getSubscriberStatus ());
64
64
}
@@ -89,15 +89,15 @@ public function testUnsubscribeSubscribe(): void
89
89
$ this ->assertEquals ($ subscriber , $ subscriber ->unsubscribe ());
90
90
$ this ->assertContains (
91
91
'You have been unsubscribed from the newsletter. ' ,
92
- $ this ->transportBuilder ->getSentMessage ()->getBody ()-> getParts ()[ 0 ]-> getRawContent ()
92
+ $ this ->transportBuilder ->getSentMessage ()->getRawMessage ()
93
93
);
94
94
$ this ->assertEquals (Subscriber::STATUS_UNSUBSCRIBED , $ subscriber ->getSubscriberStatus ());
95
95
// Subscribe and verify
96
96
$ this ->assertEquals (Subscriber::STATUS_SUBSCRIBED , $ subscriber ->subscribe ('customer@example.com ' ));
97
97
$ this ->assertEquals (Subscriber::STATUS_SUBSCRIBED , $ subscriber ->getSubscriberStatus ());
98
98
$ this ->assertContains (
99
99
'You have been successfully subscribed to our newsletter. ' ,
100
- $ this ->transportBuilder ->getSentMessage ()->getBody ()-> getParts ()[ 0 ]-> getRawContent ()
100
+ $ this ->transportBuilder ->getSentMessage ()->getRawMessage ()
101
101
);
102
102
}
103
103
@@ -116,14 +116,14 @@ public function testUnsubscribeSubscribeByCustomerId(): void
116
116
$ this ->assertEquals (Subscriber::STATUS_UNSUBSCRIBED , $ subscriber ->getSubscriberStatus ());
117
117
$ this ->assertContains (
118
118
'You have been unsubscribed from the newsletter. ' ,
119
- $ this ->transportBuilder ->getSentMessage ()->getBody ()-> getParts ()[ 0 ]-> getRawContent ()
119
+ $ this ->transportBuilder ->getSentMessage ()->getRawMessage ()
120
120
);
121
121
// Subscribe and verify
122
122
$ this ->assertSame ($ subscriber , $ subscriber ->subscribeCustomerById (1 ));
123
123
$ this ->assertEquals (Subscriber::STATUS_SUBSCRIBED , $ subscriber ->getSubscriberStatus ());
124
124
$ this ->assertContains (
125
125
'You have been successfully subscribed to our newsletter. ' ,
126
- $ this ->transportBuilder ->getSentMessage ()->getBody ()-> getParts ()[ 0 ]-> getRawContent ()
126
+ $ this ->transportBuilder ->getSentMessage ()->getRawMessage ()
127
127
);
128
128
}
129
129
@@ -143,7 +143,7 @@ public function testConfirm(): void
143
143
$ subscriber ->confirm ($ subscriber ->getSubscriberConfirmCode ());
144
144
$ this ->assertContains (
145
145
'You have been successfully subscribed to our newsletter. ' ,
146
- $ this ->transportBuilder ->getSentMessage ()->getBody ()-> getParts ()[ 0 ]-> getRawContent ()
146
+ $ this ->transportBuilder ->getSentMessage ()->getRawMessage ()
147
147
);
148
148
}
149
149
0 commit comments