Пример #1
0
 /**
  * Support method -- get parameters to log into an account (but allow override of
  * individual parameters so we can test different scenarios).
  *
  * @param array $overrides Associative array of parameters to override.
  *
  * @return \Zend\Http\Request
  */
 protected function getLoginRequest($overrides = array())
 {
     $post = $overrides + array('username' => 'testuser', 'password' => 'testpass');
     $request = new \Zend\Http\Request();
     $request->setPost(new \Zend\Stdlib\Parameters($post));
     return $request;
 }
Пример #2
0
 /**
  * Support method -- turn an array into a request populated for use by the
  * authentication class.
  *
  * @param array $post Associative array of POST parameters.
  *
  * @return \Zend\Http\Request
  */
 protected function getRequest($post)
 {
     $request = new \Zend\Http\Request();
     $request->setPost(new \Zend\Stdlib\Parameters($post));
     return $request;
 }