Move logic for return path fallback address from method classes to factory

[MAILPOET-4115]
This commit is contained in:
Rostislav Wolny
2022-03-31 15:12:05 +02:00
committed by Veljko V
parent b8bfa60634
commit 36edab34e6
8 changed files with 14 additions and 51 deletions

View File

@@ -87,22 +87,6 @@ class SMTPTest extends \MailPoetTest {
->equals($this->settings['encryption']);
}
public function testWhenReturnPathIsNullItIsSetToSenderEmail() {
$mailer = new SMTP(
$this->settings['host'],
$this->settings['port'],
$this->settings['authentication'],
$this->settings['encryption'],
$this->sender,
$this->replyTo,
$returnPath = false,
new SMTPMapper(),
$this->settings['login'],
$this->settings['password']
);
expect($mailer->returnPath)->equals($this->sender['from_email']);
}
public function testItCanCreateMessage() {
$message = $this->mailer
->createMessage($this->newsletter, $this->subscriber, $this->extraParams);