From c2a818f345579af201c3d5ded09c64deaac9451e Mon Sep 17 00:00:00 2001 From: Mary Ushenina Date: Sat, 7 Nov 2020 23:58:31 +0200 Subject: [PATCH 1/3] add methodsThatShouldExist tests for missing resources --- tests/Resources/AgentTest.php | 1 + tests/Resources/ArticleTest.php | 29 +++++++++++++++++++++++++++++ tests/Resources/DiscussionTest.php | 30 ++++++++++++++++++++++++++++++ tests/Resources/FolderTest.php | 29 +++++++++++++++++++++++++++++ tests/Resources/SolutionTest.php | 30 ++++++++++++++++++++++++++++++ 5 files changed, 119 insertions(+) create mode 100644 tests/Resources/ArticleTest.php create mode 100644 tests/Resources/DiscussionTest.php create mode 100644 tests/Resources/FolderTest.php create mode 100644 tests/Resources/SolutionTest.php diff --git a/tests/Resources/AgentTest.php b/tests/Resources/AgentTest.php index 72201ca..88b232b 100644 --- a/tests/Resources/AgentTest.php +++ b/tests/Resources/AgentTest.php @@ -22,6 +22,7 @@ public function methodsThatShouldExist() return [ ['all'], ['view'], + ['create'], ['current'], ]; } diff --git a/tests/Resources/ArticleTest.php b/tests/Resources/ArticleTest.php new file mode 100644 index 0000000..898c2e8 --- /dev/null +++ b/tests/Resources/ArticleTest.php @@ -0,0 +1,29 @@ +class = Article::class; + } + + public function methodsThatShouldExist() + { + return [ + ['create'], + ['view'], + ['update'], + ['delete'], + ]; + } +} diff --git a/tests/Resources/DiscussionTest.php b/tests/Resources/DiscussionTest.php new file mode 100644 index 0000000..2f76ee7 --- /dev/null +++ b/tests/Resources/DiscussionTest.php @@ -0,0 +1,30 @@ +class = Discussion::class; + } + + public function methodsThatShouldExist() + { + return [ + ['all'], + ['create'], + ['view'], + ['update'], + ['delete'], + ]; + } +} diff --git a/tests/Resources/FolderTest.php b/tests/Resources/FolderTest.php new file mode 100644 index 0000000..677c577 --- /dev/null +++ b/tests/Resources/FolderTest.php @@ -0,0 +1,29 @@ +class = Folder::class; + } + + public function methodsThatShouldExist() + { + return [ + ['forCategory'], + ['view'], + ['update'], + ['delete'], + ]; + } +} diff --git a/tests/Resources/SolutionTest.php b/tests/Resources/SolutionTest.php new file mode 100644 index 0000000..3741b1b --- /dev/null +++ b/tests/Resources/SolutionTest.php @@ -0,0 +1,30 @@ +class = Solution::class; + } + + public function methodsThatShouldExist() + { + return [ + ['all'], + ['create'], + ['view'], + ['update'], + ['delete'], + ]; + } +} From 303fc5bc0442fda2af40150a1bf99c3981b102c2 Mon Sep 17 00:00:00 2001 From: Mary Ushenina Date: Sat, 7 Nov 2020 23:59:22 +0200 Subject: [PATCH 2/3] fix test classes naming --- tests/Resources/CompanyTest.php | 2 +- tests/Resources/ContactTest.php | 2 +- tests/Resources/GroupTest.php | 2 +- tests/Resources/SLAPolicyTest.php | 2 +- tests/Resources/TicketTest.php | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/Resources/CompanyTest.php b/tests/Resources/CompanyTest.php index 45df28b..b6ce9e1 100644 --- a/tests/Resources/CompanyTest.php +++ b/tests/Resources/CompanyTest.php @@ -10,7 +10,7 @@ * * @author Matthew Clarkson */ -class CompanyApiTest extends TestCase +class CompanyTest extends TestCase { public function setUp() { diff --git a/tests/Resources/ContactTest.php b/tests/Resources/ContactTest.php index e347721..e824157 100644 --- a/tests/Resources/ContactTest.php +++ b/tests/Resources/ContactTest.php @@ -9,7 +9,7 @@ * * @author Matthew Clarkson */ -class ContactApiTest extends TestCase +class ContactTest extends TestCase { public function setUp() diff --git a/tests/Resources/GroupTest.php b/tests/Resources/GroupTest.php index fa5e20f..ccbb08e 100644 --- a/tests/Resources/GroupTest.php +++ b/tests/Resources/GroupTest.php @@ -9,7 +9,7 @@ * * @author Matthew Clarkson */ -class GroupApiTest extends TestCase +class GroupTest extends TestCase { public function setUp() { diff --git a/tests/Resources/SLAPolicyTest.php b/tests/Resources/SLAPolicyTest.php index 2a5eb72..22794cc 100644 --- a/tests/Resources/SLAPolicyTest.php +++ b/tests/Resources/SLAPolicyTest.php @@ -9,7 +9,7 @@ * * @author Matthew Clarkson */ -class SLAPolicytest extends TestCase +class SLAPolicyTest extends TestCase { public function setUp() { diff --git a/tests/Resources/TicketTest.php b/tests/Resources/TicketTest.php index d64f2b7..f825384 100644 --- a/tests/Resources/TicketTest.php +++ b/tests/Resources/TicketTest.php @@ -9,7 +9,7 @@ * * @author Matthew Clarkson */ -class TicketApiTest extends TestCase +class TicketTest extends TestCase { public function setUp() { From c947ecc8eaa1f29024acbc22eadf99f9aa3685a5 Mon Sep 17 00:00:00 2001 From: Mary Ushenina Date: Sun, 8 Nov 2020 00:00:43 +0200 Subject: [PATCH 3/3] remove deprecated property and CategoryTest --- tests/ApiTest.php | 1 - tests/Resources/CategoryTest.php | 31 ------------------------------- 2 files changed, 32 deletions(-) delete mode 100644 tests/Resources/CategoryTest.php diff --git a/tests/ApiTest.php b/tests/ApiTest.php index e80e05f..8aba8f8 100644 --- a/tests/ApiTest.php +++ b/tests/ApiTest.php @@ -42,7 +42,6 @@ public function publicPropertiesThatShouldExist() ['groups'], ['tickets'], ['conversations'], - ['categories'], ['forums'], ['topics'], ['comments'], diff --git a/tests/Resources/CategoryTest.php b/tests/Resources/CategoryTest.php deleted file mode 100644 index e7d64bf..0000000 --- a/tests/Resources/CategoryTest.php +++ /dev/null @@ -1,31 +0,0 @@ - - */ -class CategoryTest extends TestCase -{ - public function setUp() - { - parent::setUp(); - - $this->class = Category::class; - } - - public function methodsThatShouldExist() - { - return [ - ['create'], - ['all'], - ['view'], - ['update'], - ['delete'], - ]; - } -}