Remove SPF notice

[MAILPOET-2867]
This commit is contained in:
Pavel Dohnal
2020-04-21 13:42:08 +02:00
committed by Veljko V
parent df3a429c94
commit e5639d1adb
11 changed files with 1 additions and 149 deletions

View File

@ -14,7 +14,6 @@ use MailPoet\Mailer\Mailer;
use MailPoet\Mailer\MailerLog;
use MailPoet\Services\Bridge;
use MailPoet\Services\CongratulatoryMssEmailController;
use MailPoet\Services\SPFCheck;
use MailPoet\Settings\SettingsController;
use MailPoet\Settings\SettingsRepository;
use MailPoet\WP\Functions as WPFunctions;
@ -32,32 +31,6 @@ class ServicesTest extends \MailPoetTest {
$this->settings = SettingsController::getInstance();
}
public function testItRespondsWithErrorIfSPFCheckFails() {
$email = 'spf_test@example.com';
$this->settings->set('sender.address', $email);
$spfCheck = $this->make(
SPFCheck::class,
['checkSPFRecord' => false]
);
$servicesEndpoint = $this->createServicesEndpointWithMocks(['spfCheck' => $spfCheck]);
$response = $servicesEndpoint->checkSPFRecord([]);
expect($response->status)->equals(APIResponse::STATUS_NOT_FOUND);
expect($response->meta['sender_address'])->equals($email);
}
public function testItRespondsWithSuccessIfSPFCheckPasses() {
$spfCheck = $this->make(
SPFCheck::class,
['checkSPFRecord' => true]
);
$servicesEndpoint = $this->createServicesEndpointWithMocks(['spfCheck' => $spfCheck]);
$response = $servicesEndpoint->checkSPFRecord([]);
expect($response->status)->equals(APIResponse::STATUS_OK);
}
public function testItRespondsWithErrorIfNoMSSKeyIsGiven() {
$response = $this->diContainer->get(Services::class)->checkMSSKey(['key' => '']);
expect($response->status)->equals(APIResponse::STATUS_BAD_REQUEST);
@ -572,7 +545,6 @@ class ServicesTest extends \MailPoetTest {
$mocks['bridge'] ?? $this->diContainer->get(Bridge::class),
$this->diContainer->get(SettingsController::class),
$this->diContainer->get(Analytics::class),
$mocks['spfCheck'] ?? $this->diContainer->get(SPFCheck::class),
$this->diContainer->get(SendingServiceKeyCheck::class),
$this->diContainer->get(PremiumKeyCheck::class),
$this->diContainer->get(ServicesChecker::class),