From a6f47f903b849a7fc29e384c5cb407e6323c7c1c Mon Sep 17 00:00:00 2001 From: bkrukowski Date: Sat, 10 Sep 2016 16:20:08 +0200 Subject: [PATCH] Tests for MultiDomain --- src/Services/MultiDomain.php | 6 ++++++ tests/Services/MultiDomainTest.php | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/Services/MultiDomain.php b/src/Services/MultiDomain.php index 612137c..33f6a34 100644 --- a/src/Services/MultiDomain.php +++ b/src/Services/MultiDomain.php @@ -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; } \ No newline at end of file diff --git a/tests/Services/MultiDomainTest.php b/tests/Services/MultiDomainTest.php index 3da37ad..505cb96 100644 --- a/tests/Services/MultiDomainTest.php +++ b/tests/Services/MultiDomainTest.php @@ -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], ]; }