From 9fa7ad3e9186df276c5b8e246946db21212d22eb Mon Sep 17 00:00:00 2001 From: Stefan Warnat Date: Mon, 4 Oct 2021 01:49:00 +0200 Subject: [PATCH] implement test Function to test output without reset --- tests/TestRouter.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/tests/TestRouter.php b/tests/TestRouter.php index 1a4cfd7..636c836 100644 --- a/tests/TestRouter.php +++ b/tests/TestRouter.php @@ -48,4 +48,17 @@ class TestRouter extends \Pecee\SimpleRouter\SimpleRouter return $response; } + public static function debugOutputNoReset(string $testUrl, string $testMethod = 'get', bool $reset = true): string + { + $response = null; + + // Route request + ob_start(); + static::debugNoReset($testUrl, $testMethod, $reset); + $response = ob_get_clean(); + + // Return response + return $response; + } + } \ No newline at end of file