mirror of
https://github.com/retailcrm/mailgun-php.git
synced 2025-02-06 08:19:25 +03:00
Provide test to validate a valid email address
This commit is contained in:
parent
3f097bb178
commit
18d948be0f
@ -9,7 +9,9 @@
|
|||||||
|
|
||||||
namespace Mailgun\Tests\Api;
|
namespace Mailgun\Tests\Api;
|
||||||
|
|
||||||
|
use GuzzleHttp\Psr7\Response;
|
||||||
use Mailgun\Api\EmailValidation;
|
use Mailgun\Api\EmailValidation;
|
||||||
|
use Mailgun\Hydrator\ModelHydrator;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author David Garcia <me@davidgarcia.cat>
|
* @author David Garcia <me@davidgarcia.cat>
|
||||||
@ -20,4 +22,33 @@ class EmailValidationTest extends TestCase
|
|||||||
{
|
{
|
||||||
return EmailValidation::class;
|
return EmailValidation::class;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function testRFCValidation()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public function testDNSCheckValidation()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public function testSpoofCheckValidation()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public function testValidEmail()
|
||||||
|
{
|
||||||
|
$params = [
|
||||||
|
'address' => 'me@davidgarcia.cat',
|
||||||
|
'mailbox_verification' => true,
|
||||||
|
];
|
||||||
|
|
||||||
|
$api = $this->getApiMock();
|
||||||
|
|
||||||
|
$api->expects($this->once())
|
||||||
|
->method('httpGet')
|
||||||
|
->with('/address/private/validate', $params)
|
||||||
|
->willReturn(new Response());
|
||||||
|
|
||||||
|
$api->validate($params['address'], $params['mailbox_verification']);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user