Merge branch 'master' of github.com:gridnevalex/transparent-email

This commit is contained in:
gridnev 2020-03-20 10:28:15 +03:00
commit b5ef37942d
2 changed files with 11 additions and 2 deletions

View File

@ -20,14 +20,17 @@ class YandexRu implements ServiceInterface
public function isSupported(EmailInterface $email) : bool
{
return in_array($email->getDomain(), ['ya.ru', 'yandex.com', 'yandex.ru']);
return in_array($email->getDomain(), ['ya.ru', 'yandex.com', 'yandex.ru', 'yandex.by', 'yandex.kz', 'yandex.ua']);
}
protected function getDomainMapping() : array
{
return [
'ya.ru' => 'yandex.ru',
'yandex.com' => 'yandex.ru'
'yandex.com' => 'yandex.ru',
'yandex.by' => 'yandex.ru',
'yandex.kz' => 'yandex.ru',
'yandex.ua' => 'yandex.ru'
];
}

View File

@ -30,6 +30,9 @@ class YandexRuTest extends TestCase
['JaneDoe@ya.ru', 'janedoe@yandex.ru'],
['Jane.Doe@ya.ru', 'jane-doe@yandex.ru'],
['foobar@yandex.com', 'foobar@yandex.ru'],
['foobar@yandex.by', 'foobar@yandex.ru'],
['foobar@yandex.kz', 'foobar@yandex.ru'],
['foobar@yandex.ua', 'foobar@yandex.ru'],
];
}
@ -49,6 +52,9 @@ class YandexRuTest extends TestCase
return [
['yandex.ru', true],
['yandex.com', true],
['yandex.by', true],
['yandex.kz', true],
['yandex.ua', true],
['yandex.RU', true],
['yan.dex.ru', false],
['YANDEX.RU', true],