/** * Reset layout and Request */ protected static function resetApp() { if (self::$app) { self::$app->useLayout(true); } Proxy\Auth::clearIdentity(); Proxy\Messages::popAll(); Proxy\Request::setInstance(new Http\Request()); Proxy\Response::setInstance(new Http\Response()); Proxy\Response::setPresentation(null); }
/** * Reset layout and Request */ protected static function resetApp() { if (self::$app) { self::$app->useLayout(true); self::$app->resetRouter(); } Proxy\Auth::clearIdentity(); Proxy\Messages::popAll(); Proxy\Request::setInstance(RequestFactory::fromGlobals()); Proxy\Response::setInstance(new Bluz\Response\Response()); }
<?php // Environment error_reporting(E_ALL | E_STRICT); ini_set('display_errors', 1); // Emulate session $_SESSION = array(); $_COOKIE[session_name()] = uniqid(); require_once dirname(__DIR__) . '/vendor/autoload.php'; $env = getenv('BLUZ_ENV') ?: 'testing'; $app = \Application\Tests\BootstrapTest::getInstance(); $app->init($env);