-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ENGCOM-7467: Fixes unstable email integration tests #27892
- Merge Pull Request #27892 from hostep/magento2:fix-unstable-email-tests-part2 - Merged commits: 1. 3ec905f
- Loading branch information
Showing
3 changed files
with
9 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -89,15 +89,15 @@ public function testUnsubscribeSubscribe(): void | |
$this->assertEquals($subscriber, $subscriber->unsubscribe()); | ||
$this->assertContains( | ||
'You have been unsubscribed from the newsletter.', | ||
$this->transportBuilder->getSentMessage()->getRawMessage() | ||
$this->transportBuilder->getSentMessage()->getBody()->getParts()[0]->getRawContent() | ||
); | ||
$this->assertEquals(Subscriber::STATUS_UNSUBSCRIBED, $subscriber->getSubscriberStatus()); | ||
// Subscribe and verify | ||
$this->assertEquals(Subscriber::STATUS_SUBSCRIBED, $subscriber->subscribe('[email protected]')); | ||
$this->assertEquals(Subscriber::STATUS_SUBSCRIBED, $subscriber->getSubscriberStatus()); | ||
$this->assertContains( | ||
'You have been successfully subscribed to our newsletter.', | ||
$this->transportBuilder->getSentMessage()->getRawMessage() | ||
$this->transportBuilder->getSentMessage()->getBody()->getParts()[0]->getRawContent() | ||
); | ||
} | ||
|
||
|
@@ -116,14 +116,14 @@ public function testUnsubscribeSubscribeByCustomerId(): void | |
$this->assertEquals(Subscriber::STATUS_UNSUBSCRIBED, $subscriber->getSubscriberStatus()); | ||
$this->assertContains( | ||
'You have been unsubscribed from the newsletter.', | ||
$this->transportBuilder->getSentMessage()->getRawMessage() | ||
$this->transportBuilder->getSentMessage()->getBody()->getParts()[0]->getRawContent() | ||
); | ||
// Subscribe and verify | ||
$this->assertSame($subscriber, $subscriber->subscribeCustomerById(1)); | ||
$this->assertEquals(Subscriber::STATUS_SUBSCRIBED, $subscriber->getSubscriberStatus()); | ||
$this->assertContains( | ||
'You have been successfully subscribed to our newsletter.', | ||
$this->transportBuilder->getSentMessage()->getRawMessage() | ||
$this->transportBuilder->getSentMessage()->getBody()->getParts()[0]->getRawContent() | ||
); | ||
} | ||
|
||
|
@@ -143,7 +143,7 @@ public function testConfirm(): void | |
$subscriber->confirm($subscriber->getSubscriberConfirmCode()); | ||
$this->assertContains( | ||
'You have been successfully subscribed to our newsletter.', | ||
$this->transportBuilder->getSentMessage()->getRawMessage() | ||
$this->transportBuilder->getSentMessage()->getBody()->getParts()[0]->getRawContent() | ||
); | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters