assertEquals($outputEmail, (new MailRu())->getPrimaryEmail(new Email($inputEmail))); } public function providerGetPrimaryEmail() : array { return [ ['foobar@MAIL.RU', 'foobar@mail.ru'], ['fOObar@MaiL.Ru', 'foobar@mail.ru'], ['foobar+alias@mail.ru', 'foobar@mail.ru'], ]; } /** * @dataProvider providerIsSupported * * @param string $domain * @param bool $result */ public function testIsSupported(string $domain, bool $result) { $this->assertSame($result, (new MailRu())->isSupported(new Email('Jane.Doe@' . $domain))); } public function providerIsSupported() : array { return [ ['mail.ru', true], ['mail.RU', true], ['MAIL.RU', true], ['ma.il.ru', false], ]; } }