From 0145ddd4815020931775bc734c54167801189aad Mon Sep 17 00:00:00 2001 From: Nyholm Date: Sun, 5 Aug 2018 13:04:39 +0200 Subject: [PATCH] Added more tests --- .../Domain/DeleteCredentialResponseTest.php | 35 ++++++++ tests/Model/Domain/DeleteResponseTest.php | 32 ++++++++ tests/Model/Domain/DnsRecordTest.php | 40 +++++++++ tests/Model/Domain/DomainTest.php | 46 +++++++++++ tests/Model/Domain/IndexResponseTest.php | 48 +++++++++++ tests/Model/Domain/ShowResponseTest.php | 80 ++++++++++++++++++ .../Domain/UpdateConnectionResponseTest.php | 41 ++++++++++ .../Domain/UpdateCredentialResponseTest.php | 38 +++++++++ tests/Model/Domain/VerifyResponseTest.php | 81 +++++++++++++++++++ 9 files changed, 441 insertions(+) create mode 100644 tests/Model/Domain/DeleteCredentialResponseTest.php create mode 100644 tests/Model/Domain/DeleteResponseTest.php create mode 100644 tests/Model/Domain/DnsRecordTest.php create mode 100644 tests/Model/Domain/DomainTest.php create mode 100644 tests/Model/Domain/IndexResponseTest.php create mode 100644 tests/Model/Domain/ShowResponseTest.php create mode 100644 tests/Model/Domain/UpdateConnectionResponseTest.php create mode 100644 tests/Model/Domain/UpdateCredentialResponseTest.php create mode 100644 tests/Model/Domain/VerifyResponseTest.php diff --git a/tests/Model/Domain/DeleteCredentialResponseTest.php b/tests/Model/Domain/DeleteCredentialResponseTest.php new file mode 100644 index 0000000..b010191 --- /dev/null +++ b/tests/Model/Domain/DeleteCredentialResponseTest.php @@ -0,0 +1,35 @@ +assertNotEmpty($model->getMessage()); + $this->assertEmpty($model->getError()); + $this->assertNotEmpty($model->getSpec()); + } +} diff --git a/tests/Model/Domain/DeleteResponseTest.php b/tests/Model/Domain/DeleteResponseTest.php new file mode 100644 index 0000000..b5c30c9 --- /dev/null +++ b/tests/Model/Domain/DeleteResponseTest.php @@ -0,0 +1,32 @@ +assertNotEmpty($model->getMessage()); + } +} diff --git a/tests/Model/Domain/DnsRecordTest.php b/tests/Model/Domain/DnsRecordTest.php new file mode 100644 index 0000000..fd491b3 --- /dev/null +++ b/tests/Model/Domain/DnsRecordTest.php @@ -0,0 +1,40 @@ +assertNotEmpty($model->getType()); + $this->assertNotEmpty($model->getValidity()); + $this->assertTrue($model->isValid()); + $this->assertNotEmpty($model->getName()); + $this->assertNotEmpty($model->getValue()); + } +} diff --git a/tests/Model/Domain/DomainTest.php b/tests/Model/Domain/DomainTest.php new file mode 100644 index 0000000..ab72b64 --- /dev/null +++ b/tests/Model/Domain/DomainTest.php @@ -0,0 +1,46 @@ +assertNotEmpty($model->getName()); + $this->assertNotEmpty($model->getCreatedAt()); + $this->assertFalse($model->isWildcard()); + $this->assertNotEmpty($model->getSpamAction()); + $this->assertNotEmpty($model->getSmtpPassword()); + $this->assertNotEmpty($model->getSmtpUsername()); + $this->assertNotEmpty($model->getState()); + } +} diff --git a/tests/Model/Domain/IndexResponseTest.php b/tests/Model/Domain/IndexResponseTest.php new file mode 100644 index 0000000..23ea650 --- /dev/null +++ b/tests/Model/Domain/IndexResponseTest.php @@ -0,0 +1,48 @@ +assertEquals(1, $model->getTotalCount()); + $this->assertCount(1, $model->getDomains()); + } +} diff --git a/tests/Model/Domain/ShowResponseTest.php b/tests/Model/Domain/ShowResponseTest.php new file mode 100644 index 0000000..6ff1ee3 --- /dev/null +++ b/tests/Model/Domain/ShowResponseTest.php @@ -0,0 +1,80 @@ +assertCount(2, $model->getInboundDNSRecords()); + $this->assertCount(3, $model->getOutboundDNSRecords()); + $this->assertInstanceOf(Domain::class, $model->getDomain()); + } +} diff --git a/tests/Model/Domain/UpdateConnectionResponseTest.php b/tests/Model/Domain/UpdateConnectionResponseTest.php new file mode 100644 index 0000000..1760ff1 --- /dev/null +++ b/tests/Model/Domain/UpdateConnectionResponseTest.php @@ -0,0 +1,41 @@ +assertNotEmpty($model->getMessage()); + $this->assertTrue($model->getRequireTLS()); + $this->assertFalse($model->getSkipVerification()); + } +} diff --git a/tests/Model/Domain/UpdateCredentialResponseTest.php b/tests/Model/Domain/UpdateCredentialResponseTest.php new file mode 100644 index 0000000..2f0a78f --- /dev/null +++ b/tests/Model/Domain/UpdateCredentialResponseTest.php @@ -0,0 +1,38 @@ +assertNotEmpty($model->getMessage()); + } +} diff --git a/tests/Model/Domain/VerifyResponseTest.php b/tests/Model/Domain/VerifyResponseTest.php new file mode 100644 index 0000000..b773d28 --- /dev/null +++ b/tests/Model/Domain/VerifyResponseTest.php @@ -0,0 +1,81 @@ +assertNull($model->getMessage()); + } +}