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; if(isset($_ALL_CLASSES)) { $_ALL_CLASSES['parents']['FakeController'] = array_merge($_ALL_CLASSES['parents']['Controller'], array('Controller' => 'Controller')); } // Prepare manifest autoloader $controller = new FakeController(); // Get test manifest TestRunner::use_test_manifest(); // Remove the error handler so that PHPUnit can add its own restore_error_handler();