PR feedback: add type hints, create new methods and save on extra api request

MAILPOET-4601
This commit is contained in:
Oluwaseun Olorunsola
2022-09-16 06:42:38 +01:00
committed by Aschepikov
parent 32a58301b0
commit a006701d78
5 changed files with 35 additions and 28 deletions

View File

@ -479,6 +479,7 @@ class ServicesTest extends \MailPoetTest {
public function testCongratulatoryEmailRespondsWithErrorWhenNoEmailAuthorized() {
$this->settings->set(Mailer::MAILER_CONFIG_SETTING_NAME, ['method' => Mailer::METHOD_MAILPOET]);
$this->settings->set('sender.address', 'unauthorized@email.com');
$bridge = $this->make(Bridge::class, [
'getAuthorizedEmailAddresses' => [],
]);
@ -497,7 +498,7 @@ class ServicesTest extends \MailPoetTest {
$verifiedDomains = ['email.com'];
$senderDomainMock = $this->make(AuthorizedSenderDomainController::class, [
'getVerifiedSenderDomains' => Expected::once($verifiedDomains),
'getVerifiedSenderDomainsIgnoringCache' => $verifiedDomains,
]);
$servicesEndpoint = $this->createServicesEndpointWithMocks([