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