public function __construct() { parent::__construct(); $session = Injector::inst()->create('SilverStripe\\Control\\Session', isset($_SESSION) ? $_SESSION : array()); $this->setSession($session); $this->pushCurrent(); $request = new HTTPRequest(isset($_SERVER['X-HTTP-Method-Override']) ? $_SERVER['X-HTTP-Method-Override'] : $_SERVER['REQUEST_METHOD'], '/'); $this->setRequest($request); $this->setResponse(new HTTPResponse()); $this->doInit(); }
public function __construct() { parent::__construct(); $this->validator = Injector::inst()->create('SilverStripe\\Assets\\Upload_Validator'); $this->replaceFile = self::config()->replaceFile; }
public function __construct() { $this->failover = new RequestHandlingTest_ControllerFailover(); parent::__construct(); }