mirror of
https://github.com/skipperbent/simple-php-router.git
synced 2026-07-11 23:22:11 +00:00
implement test Function to test output without reset
This commit is contained in:
@@ -48,4 +48,17 @@ class TestRouter extends \Pecee\SimpleRouter\SimpleRouter
|
|||||||
return $response;
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user