mirror of
https://github.com/retailcrm/mailgun-php.git
synced 2024-11-29 08:26:06 +03:00
Tests
This commit is contained in:
parent
73565a6372
commit
d987c3e5e2
@ -63,6 +63,23 @@ class MailingListTest extends TestCase
|
||||
$api->create($address = 'foo@example.com', $name = 'Foo', $description = 'Description', $accessLevel = 'readonly');
|
||||
}
|
||||
|
||||
public function testCreateWithNulls()
|
||||
{
|
||||
$data = [
|
||||
'address' => 'foo@example.com',
|
||||
'access_level' => 'readonly',
|
||||
'reply_preference' => 'list',
|
||||
];
|
||||
|
||||
$api = $this->getApiMock();
|
||||
$api->expects($this->once())
|
||||
->method('httpPost')
|
||||
->with('/v3/lists', $data)
|
||||
->willReturn(new Response());
|
||||
|
||||
$api->create($address = 'foo@example.com', null, null, $accessLevel = 'readonly');
|
||||
}
|
||||
|
||||
public function testCreateInvalidAddress()
|
||||
{
|
||||
$this->expectException(InvalidArgumentException::class);
|
||||
|
Loading…
Reference in New Issue
Block a user