From 9d38b5dcb163b64fb1c9118d1e7fe723d0203be7 Mon Sep 17 00:00:00 2001 From: jacobemerick Date: Thu, 25 Aug 2016 05:02:07 -0700 Subject: [PATCH] Adds error handler test, fixes bad middleware test names --- tests/unit/ErrorHandler/JsonResponseTest.php | 25 +++++++++++++++++++ .../{JsonHeader.php => JsonHeaderTest.php} | 5 ++++ ...arseJsonBody.php => ParseJsonBodyTest.php} | 5 ++++ 3 files changed, 35 insertions(+) create mode 100644 tests/unit/ErrorHandler/JsonResponseTest.php rename tests/unit/Middleware/{JsonHeader.php => JsonHeaderTest.php} (80%) rename tests/unit/Middleware/{ParseJsonBody.php => ParseJsonBodyTest.php} (88%) diff --git a/tests/unit/ErrorHandler/JsonResponseTest.php b/tests/unit/ErrorHandler/JsonResponseTest.php new file mode 100644 index 0000000..be6f1ea --- /dev/null +++ b/tests/unit/ErrorHandler/JsonResponseTest.php @@ -0,0 +1,25 @@ +assertInstanceOf(JsonResponse::class, $errorHandler); + } + + public function testInvokeWritesEncodedErrorToResponse() + { + $this->markTestIncomplete('todo'); + } + + public function testInvokeReturnsResponse() + { + $this->markTestIncomplete('todo'); + } +} diff --git a/tests/unit/Middleware/JsonHeader.php b/tests/unit/Middleware/JsonHeaderTest.php similarity index 80% rename from tests/unit/Middleware/JsonHeader.php rename to tests/unit/Middleware/JsonHeaderTest.php index dfe7fc5..6cf9181 100644 --- a/tests/unit/Middleware/JsonHeader.php +++ b/tests/unit/Middleware/JsonHeaderTest.php @@ -17,4 +17,9 @@ public function testInvokeAddsJsonHeader() { $this->markTestIncomplete('todo'); } + + public function testInvokeReturnsResponse() + { + $this->markTestIncomplete('todo'); + } } diff --git a/tests/unit/Middleware/ParseJsonBody.php b/tests/unit/Middleware/ParseJsonBodyTest.php similarity index 88% rename from tests/unit/Middleware/ParseJsonBody.php rename to tests/unit/Middleware/ParseJsonBodyTest.php index a326d79..cac53db 100644 --- a/tests/unit/Middleware/ParseJsonBody.php +++ b/tests/unit/Middleware/ParseJsonBodyTest.php @@ -32,4 +32,9 @@ public function testInvokePassesParsedBodyToRequest() { $this->markTestIncomplete('todo'); } + + public function testInvokeReturnsCallback() + { + $this->markTestIncomplete('todo'); + } }