Fix typo in isDomainDmarcRestricted method name
[MAILPOET-4302]
This commit is contained in:
committed by
Veljko V
parent
4ffdd5bed5
commit
fd1ac46207
@@ -263,7 +263,7 @@ class Settings extends APIEndpoint {
|
||||
|
||||
$domain = strtolower(trim($domain));
|
||||
|
||||
$response = ['isDmarcPolicyRetricted' => $this->senderDomainController->isDomainDmarcRetricted($domain)];
|
||||
$response = ['isDmarcPolicyRetricted' => $this->senderDomainController->isDomainDmarcRestricted($domain)];
|
||||
|
||||
return $this->successResponse($response);
|
||||
}
|
||||
|
@@ -129,10 +129,10 @@ class AuthorizedSenderDomainController {
|
||||
/**
|
||||
* 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`
|
||||
*/
|
||||
public function isDomainDmarcRetricted(string $domain): bool {
|
||||
public function isDomainDmarcRestricted(string $domain): bool {
|
||||
$result = $this->getDmarcPolicyForDomain($domain);
|
||||
return $result !== DmarcPolicyChecker::POLICY_NONE;
|
||||
}
|
||||
|
@@ -147,13 +147,13 @@ class AuthorizedSenderDomainControllerTest extends \MailPoetTest {
|
||||
|
||||
public function testItReturnsTrueWhenDmarcIsEnabled() {
|
||||
$controller = $this->getController();
|
||||
$isRetricted = $controller->isDomainDmarcRetricted('mailpoet.com');
|
||||
$isRetricted = $controller->isDomainDmarcRestricted('mailpoet.com');
|
||||
expect($isRetricted)->same(true);
|
||||
}
|
||||
|
||||
public function testItReturnsFalseWhenDmarcIsNotEnabled() {
|
||||
$controller = $this->getController();
|
||||
$isRetricted = $controller->isDomainDmarcRetricted('example.com');
|
||||
$isRetricted = $controller->isDomainDmarcRestricted('example.com');
|
||||
expect($isRetricted)->same(false);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user