Files
piratepoet/mailpoet/tests/unit/Util/SecondLevelDomainNamesTest.php
Rodrigo Primo afe378ba22 Replace expect()->equals() with verify()->equals()
codeception/verify 2.1 removed support for expect()->equals() so we need
to replace it with verify()->equals().

[MAILPOET-5664]
2023-10-24 08:58:22 +03:00

35 lines
1.0 KiB
PHP

<?php declare(strict_types = 1);
namespace MailPoet\Util;
class SecondLevelDomainNamesTest extends \MailPoetUnitTest {
/** @var SecondLevelDomainNames */
private $extractor;
public function _before() {
parent::_before();
$this->extractor = new SecondLevelDomainNames();
}
public function testItGetsSecondLevelDomainName() {
verify($this->extractor->get('mailpoet.com'))->equals('mailpoet.com');
}
public function testItGetsSecondLevelDomainNameFromThirdLevel() {
verify($this->extractor->get('newsletters.mailpoet.com'))->equals('mailpoet.com');
}
public function testItGetsSecondLevelDomainNameWithCoUk() {
verify($this->extractor->get('example.co.uk'))->equals('example.co.uk');
}
public function testItGetsSecondLevelDomainNameFromThirdLevelWithCoUk() {
verify($this->extractor->get('test.example.co.uk'))->equals('example.co.uk');
}
public function testItGetsSecondLevelDomainNameForLocalhost() {
verify($this->extractor->get('localhost'))->equals('localhost');
}
}