Tests for MultiDomain

This commit is contained in:
bkrukowski 2016-09-10 16:20:08 +02:00
parent a2e4dbd2e4
commit a6f47f903b
2 changed files with 8 additions and 1 deletions

View File

@ -30,7 +30,13 @@ abstract class MultiDomain implements ServiceInterface
return false;
}
/**
* @return string Hostname in lowercase
*/
abstract protected function getPrimaryDomain() : string;
/**
* @return array List of hostnames in lowercase
*/
abstract protected function getDomainList() : array;
}

View File

@ -23,7 +23,8 @@ class MultiDomainTest extends \PHPUnit_Framework_TestCase
return [
[$this->getMultiDomainMock('foo.bar', ['foo.bar']), 'gmail.com', false],
[$this->getMultiDomainMock('foo.bar', ['foo.bar', 'gmail.com']), 'gmail.com', true],
[$this->getMultiDomainMock('Foo.Bar', ['foo.bar', 'gmail.com']), 'gmail.com', true],
[$this->getMultiDomainMock('foo.bar', ['foo.bar', 'gmail.com']), 'GMAIL.COM', true],
[$this->getMultiDomainMock('foo.bar', ['foo.bar', 'gmail.com'], true), 'GMAIL.COM', true],
];
}