2016-09-16 01:13:48 +02:00
|
|
|
<?php
|
|
|
|
|
2016-09-23 21:39:33 +02:00
|
|
|
declare(strict_types=1);
|
|
|
|
|
2016-09-16 01:13:48 +02:00
|
|
|
namespace bkrukowski\TransparentEmail\Tests\Services;
|
|
|
|
|
2016-09-24 12:09:20 +02:00
|
|
|
use bkrukowski\TransparentEmail\Emails\Email;
|
2016-09-16 01:13:48 +02:00
|
|
|
use bkrukowski\TransparentEmail\Services\AppsGoogleCom;
|
2020-02-13 16:27:05 +03:00
|
|
|
use PHPUnit\Framework\TestCase;
|
2016-09-16 01:13:48 +02:00
|
|
|
|
2020-02-13 16:27:05 +03:00
|
|
|
class AppsGoogleComTest extends TestCase
|
2016-09-16 01:13:48 +02:00
|
|
|
{
|
|
|
|
/**
|
2016-09-24 12:09:20 +02:00
|
|
|
* @dataProvider providerIsSupported
|
2016-09-16 01:13:48 +02:00
|
|
|
*
|
|
|
|
* @param string $domain
|
|
|
|
* @param bool $result
|
|
|
|
*/
|
2016-09-24 12:09:20 +02:00
|
|
|
public function testIsSupported(string $domain, bool $result)
|
2016-09-16 01:13:48 +02:00
|
|
|
{
|
2016-09-24 12:09:20 +02:00
|
|
|
$this->assertSame($result, (new AppsGoogleCom())->isSupported(new Email('Jane.Doe@' . $domain, true)));
|
2016-09-16 01:13:48 +02:00
|
|
|
}
|
|
|
|
|
2016-10-14 20:25:52 +02:00
|
|
|
public function providerIsSupported() : array
|
2016-09-16 01:13:48 +02:00
|
|
|
{
|
|
|
|
return [
|
|
|
|
['example.com', false],
|
2016-09-24 12:09:20 +02:00
|
|
|
['EXAMPLE.COM', false],
|
2016-09-16 01:13:48 +02:00
|
|
|
['krukowski.me', true],
|
2016-09-24 12:09:20 +02:00
|
|
|
['KRUKOWSKI.ME', true],
|
2016-09-16 01:13:48 +02:00
|
|
|
];
|
|
|
|
}
|
|
|
|
}
|