implement test Function to test output without reset

This commit is contained in:
Stefan Warnat
2021-10-04 01:49:00 +02:00
parent 749f252ffb
commit 9fa7ad3e91

View File

@@ -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;
}
}