From 4641cf735fd16e006ade7ba03bccc275c89c7fb2 Mon Sep 17 00:00:00 2001 From: Tibor Hercz Date: Fri, 12 Jun 2020 08:55:34 +0200 Subject: [PATCH] added tests --- tests/Api/DomainTest.php | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/tests/Api/DomainTest.php b/tests/Api/DomainTest.php index 86ab5e7..29a07ed 100644 --- a/tests/Api/DomainTest.php +++ b/tests/Api/DomainTest.php @@ -129,6 +129,38 @@ JSON $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() { $this->setRequestMethod('DELETE');