added tests

This commit is contained in:
Tibor Hercz 2020-06-12 08:55:34 +02:00 committed by David Garcia
parent b91979b1b6
commit 4641cf735f

View File

@ -129,6 +129,38 @@ JSON
$api->create('example.com', 'foo', 'bar', true); $api->create('example.com', 'foo', 'bar', true);
} }
public function testCreateWithPasswordForceDkimAuthority()
{
$this->setRequestMethod('POST');
$this->setRequestUri('/v3/domains');
$this->setRequestBody([
'name' => 'example.com',
'smtp_password' => 'foo',
'force_dkim_authority' => 'true',
]);
$this->setHydrateClass(CreateResponse::class);
$api = $this->getApiInstance();
$api->create('example.com', 'foo', null, null, true);
}
public function testCreateWithPasswordSpamActionWildcardForceDkimAuthority()
{
$this->setRequestMethod('POST');
$this->setRequestUri('/v3/domains');
$this->setRequestBody([
'name' => 'example.com',
'smtp_password' => 'foo',
'spam_action' => 'bar',
'wildcard' => 'true',
'force_dkim_authority' => 'true',
]);
$this->setHydrateClass(CreateResponse::class);
$api = $this->getApiInstance();
$api->create('example.com', 'foo', 'bar', true, true);
}
public function testDelete() public function testDelete()
{ {
$this->setRequestMethod('DELETE'); $this->setRequestMethod('DELETE');