From e4bb3e11331f0f59a9a0b7c1329522b97ad9ca64 Mon Sep 17 00:00:00 2001 From: Vlad Date: Tue, 5 Sep 2017 10:33:10 -0400 Subject: [PATCH] Adds unit test --- .../API/JSON/v1/AutomatedLatestContentTest.php | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 tests/unit/API/JSON/v1/AutomatedLatestContentTest.php diff --git a/tests/unit/API/JSON/v1/AutomatedLatestContentTest.php b/tests/unit/API/JSON/v1/AutomatedLatestContentTest.php new file mode 100644 index 0000000000..73924f780a --- /dev/null +++ b/tests/unit/API/JSON/v1/AutomatedLatestContentTest.php @@ -0,0 +1,18 @@ +getPostTypes(); + expect($response->data)->notEmpty(); + foreach($response->data as $post_type) { + expect($post_type)->count(2); + expect($post_type['name'])->notEmpty(); + expect($post_type['label'])->notEmpty(); + } + } +}