public function setup() { parent::setup(); // when running from the command line, these elements are empty. // add them so that web-like testing can occur. $this->_request->server['HTTP_HOST'] = 'example.com'; $this->_request->server['SCRIPT_NAME'] = '/index.php'; $this->_request->server['PATH_INFO'] = '/control/action'; $this->_request->server['QUERY_STRING'] = 'foo=bar&baz=dib&process=zim'; $this->_request->server['REQUEST_URI'] = $this->_request->server['SCRIPT_NAME'] . $this->_request->server['PATH_INFO'] . '?' . $this->_request->server['QUERY_STRING']; // emulate GET vars from the URI parse_str($this->_request->server['QUERY_STRING'], $this->_request->get); }
public function setup() { Solar::start(false); // to get the $locale object parent::setup(); // when running from the command line, these elements are empty. // add them so that web-like testing can occur. $this->_request->server['HTTP_HOST'] = 'example.com'; $this->_request->server['SCRIPT_NAME'] = '/path/to/index.php'; $this->_request->server['PATH_INFO'] = '/appname/action'; $this->_request->server['QUERY_STRING'] = ''; $this->_request->server['REQUEST_URI'] = $this->_request->server['SCRIPT_NAME'] . $this->_request->server['PATH_INFO'] . '?' . $this->_request->server['QUERY_STRING']; // emulate GET vars from the URI and inject to $this->_request parse_str($this->_request->server['QUERY_STRING'], $this->_request->get); }
public function setup() { Solar::start(false); // to get the $locale object parent::setup(); }