setSession($session); $this->pushCurrent(); $this->request = new SS_HTTPRequest( (isset($_SERVER['X-HTTP-Method-Override'])) ? $_SERVER['X-HTTP-Method-Override'] : $_SERVER['REQUEST_METHOD'], '/' ); $this->response = new SS_HTTPResponse(); $this->init(); } } global $_ALL_CLASSES; $_ALL_CLASSES['parents']['FakeController'] = array_merge($_ALL_CLASSES['parents']['Controller'], array('Controller' => 'Controller')); $controller = new FakeController(); // Connect to database global $databaseConfig; require_once(getcwd()."/sapphire/core/model/DB.php"); DB::connect($databaseConfig); // Get test manifest ManifestBuilder::load_test_manifest();