diff --git a/tests/server-v2/index.php b/tests/server-v2/index.php
index 3c1951c..d0f8bcd 100644
--- a/tests/server-v2/index.php
+++ b/tests/server-v2/index.php
@@ -116,6 +116,10 @@ Flight::route('/jsonp', function () {
echo "\n\n\n\n\n";
});
+Flight::route('/json-halt', function () {
+ Flight::jsonHalt(['message' => 'JSON rendered and halted successfully with no other body content!']);
+});
+
// Test 10: Halt
Flight::route('/halt', function () {
Flight::halt(400, 'Halt worked successfully');
@@ -200,6 +204,7 @@ echo '
Error
JSON
JSONP
+JSON Halt
Halt
Redirect
';
diff --git a/tests/server/LayoutMiddleware.php b/tests/server/LayoutMiddleware.php
index d23e81c..2d55f24 100644
--- a/tests/server/LayoutMiddleware.php
+++ b/tests/server/LayoutMiddleware.php
@@ -74,6 +74,7 @@ class LayoutMiddleware
Error
JSON
JSONP
+JSON Halt
Halt
Redirect
Stream Plain
diff --git a/tests/server/index.php b/tests/server/index.php
index a983590..5c86d11 100644
--- a/tests/server/index.php
+++ b/tests/server/index.php
@@ -171,6 +171,10 @@ Flight::route('/jsonp', function () {
Flight::jsonp(['message' => 'JSONP renders successfully!'], 'jsonp');
});
+Flight::route('/json-halt', function () {
+ Flight::jsonHalt(['message' => 'JSON rendered and halted successfully with no other body content!']);
+});
+
Flight::map('error', function (Throwable $e) {
echo sprintf(
<<