// Clean up any open output buffers
// not relevant to unit testing
if (\
ob_get_level() > 0
&& (!
isset($this->clean
) ||
$this->clean === true
)) { \
ob_end_clean(); // @codeCoverageIgnore
} // Simulate having a blank session
$_SESSION =
[];
$_SERVER['REQUEST_METHOD'
] =
$method;
$request =
$this->
setupRequest($method,
$path);
$request =
$this->
setupHeaders($request);
$request =
$this->
populateGlobals($method,
$request,
$params);
$request =
$this->
setRequestBody($request);
// Initialize the RouteCollection
if (!
$routes =
$this->routes
) { $routes = Services::
routes()->
loadRoutes();
} $routes->
setHTTPVerb($method);