mirror of
https://github.com/retailcrm/transparent-email.git
synced 2024-11-25 06:46:05 +03:00
Merge branch 'master' of github.com:gridnevalex/transparent-email
This commit is contained in:
commit
b5ef37942d
@ -20,14 +20,17 @@ class YandexRu implements ServiceInterface
|
|||||||
|
|
||||||
public function isSupported(EmailInterface $email) : bool
|
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
|
protected function getDomainMapping() : array
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
'ya.ru' => 'yandex.ru',
|
'ya.ru' => 'yandex.ru',
|
||||||
'yandex.com' => 'yandex.ru'
|
'yandex.com' => 'yandex.ru',
|
||||||
|
'yandex.by' => 'yandex.ru',
|
||||||
|
'yandex.kz' => 'yandex.ru',
|
||||||
|
'yandex.ua' => 'yandex.ru'
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -30,6 +30,9 @@ class YandexRuTest extends TestCase
|
|||||||
['JaneDoe@ya.ru', 'janedoe@yandex.ru'],
|
['JaneDoe@ya.ru', 'janedoe@yandex.ru'],
|
||||||
['Jane.Doe@ya.ru', 'jane-doe@yandex.ru'],
|
['Jane.Doe@ya.ru', 'jane-doe@yandex.ru'],
|
||||||
['foobar@yandex.com', 'foobar@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 [
|
return [
|
||||||
['yandex.ru', true],
|
['yandex.ru', true],
|
||||||
['yandex.com', true],
|
['yandex.com', true],
|
||||||
|
['yandex.by', true],
|
||||||
|
['yandex.kz', true],
|
||||||
|
['yandex.ua', true],
|
||||||
['yandex.RU', true],
|
['yandex.RU', true],
|
||||||
['yan.dex.ru', false],
|
['yan.dex.ru', false],
|
||||||
['YANDEX.RU', true],
|
['YANDEX.RU', true],
|
||||||
|
Loading…
Reference in New Issue
Block a user