Skip to content

Commit

Permalink
test(php): test addCustomDomains
Browse files Browse the repository at this point in the history
  • Loading branch information
choznerol committed Nov 9, 2021
1 parent ed87b68 commit 72b47aa
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions test/platform.php.test.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,17 @@ public function testReturnFalseForBlacklistedDomainsAndTheirSubdomains($blacklis
// Should not be invalid as a subdomain of a valid domain.
$this->isValid('test@'.$blacklistedDomain.'.gmail.com');
}

public function testAddCustomDomains()
{
$this->isValid('foo@youtube.com');
$this->isValid('foo@google.com');
$this->isValid('ok@gmail.com');

MailChecker::addCustomDomains(['youtube.com', 'google.com']);

$this->isInvalid('foo@youtube.com');
$this->isInvalid('foo@google.com');
$this->isValid('ok@gmail.com');
}
}

0 comments on commit 72b47aa

Please sign in to comment.