mirror of
https://github.com/retailcrm/mailgun-php.git
synced 2025-02-06 08:19:25 +03:00
Provide test to parse a valid email address
This commit is contained in:
parent
2c37651097
commit
8cb9a0e48a
@ -38,4 +38,21 @@ class EmailValidationTest extends TestCase
|
|||||||
|
|
||||||
$api->validate($params['address'], $params['mailbox_verification']);
|
$api->validate($params['address'], $params['mailbox_verification']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function testParseEmail()
|
||||||
|
{
|
||||||
|
$params = [
|
||||||
|
'addresses' => 'me@davidgarcia.cat',
|
||||||
|
'syntax_only' => true,
|
||||||
|
];
|
||||||
|
|
||||||
|
$api = $this->getApiMock();
|
||||||
|
|
||||||
|
$api->expects($this->once())
|
||||||
|
->method('httpGet')
|
||||||
|
->with('/address/private/parse', $params)
|
||||||
|
->willReturn(new Response());
|
||||||
|
|
||||||
|
$api->parse($params['addresses'], $params['syntax_only']);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user