diff --git a/src/Services/YandexRu.php b/src/Services/YandexRu.php index e2d4dce..7d36cd7 100644 --- a/src/Services/YandexRu.php +++ b/src/Services/YandexRu.php @@ -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' ]; } diff --git a/tests/Services/YandexRuTest.php b/tests/Services/YandexRuTest.php index 9d74e34..797f7fd 100644 --- a/tests/Services/YandexRuTest.php +++ b/tests/Services/YandexRuTest.php @@ -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],