Fix typo in isDomainDmarcRestricted method name

[MAILPOET-4302]
This commit is contained in:
Rostislav Wolny
2022-07-26 16:10:11 +02:00
committed by Veljko V
parent 4ffdd5bed5
commit fd1ac46207
3 changed files with 5 additions and 5 deletions

View File

@@ -263,7 +263,7 @@ class Settings extends APIEndpoint {
$domain = strtolower(trim($domain)); $domain = strtolower(trim($domain));
$response = ['isDmarcPolicyRetricted' => $this->senderDomainController->isDomainDmarcRetricted($domain)]; $response = ['isDmarcPolicyRetricted' => $this->senderDomainController->isDomainDmarcRestricted($domain)];
return $this->successResponse($response); return $this->successResponse($response);
} }

View File

@@ -129,10 +129,10 @@ class AuthorizedSenderDomainController {
/** /**
* Check Domain DMARC Policy * Check Domain DMARC Policy
* *
* returns `true` if domain has Retricted policy e.g policy === reject or quarantine * returns `true` if domain has Restricted policy e.g. policy === reject or quarantine
* otherwise returns `false` * otherwise returns `false`
*/ */
public function isDomainDmarcRetricted(string $domain): bool { public function isDomainDmarcRestricted(string $domain): bool {
$result = $this->getDmarcPolicyForDomain($domain); $result = $this->getDmarcPolicyForDomain($domain);
return $result !== DmarcPolicyChecker::POLICY_NONE; return $result !== DmarcPolicyChecker::POLICY_NONE;
} }

View File

@@ -147,13 +147,13 @@ class AuthorizedSenderDomainControllerTest extends \MailPoetTest {
public function testItReturnsTrueWhenDmarcIsEnabled() { public function testItReturnsTrueWhenDmarcIsEnabled() {
$controller = $this->getController(); $controller = $this->getController();
$isRetricted = $controller->isDomainDmarcRetricted('mailpoet.com'); $isRetricted = $controller->isDomainDmarcRestricted('mailpoet.com');
expect($isRetricted)->same(true); expect($isRetricted)->same(true);
} }
public function testItReturnsFalseWhenDmarcIsNotEnabled() { public function testItReturnsFalseWhenDmarcIsNotEnabled() {
$controller = $this->getController(); $controller = $this->getController();
$isRetricted = $controller->isDomainDmarcRetricted('example.com'); $isRetricted = $controller->isDomainDmarcRestricted('example.com');
expect($isRetricted)->same(false); expect($isRetricted)->same(false);
} }