Example #1
0
 /**
  * Sign's user in with sfGuardAuth.
  * Uses standard path: /sfGuardAuth/signin for authorization.
  * Provide username and password.
  *
  * @param $username
  * @param $password
  */
 public function signIn($username, $password)
 {
     $this->browser->post('/sfGuardAuth/signin', array('signin' => array('username' => $username, 'password' => $password)));
     $this->debug('session: ' . json_encode($this->browser->getUser()->getAttributeHolder()->getAll()));
     $this->debug('user: '******'sfGuardSecurityUser')));
     $this->debug('credentials: ' . json_encode($this->browser->getUser()->getCredentials()));
     $this->browser->get('/');
     $this->followRedirect();
 }
 /**
  * Dispatches a soap request via a sfTestBrowser to the tested application.
  *
  * @see SoapClient::__doRequest()
  */
 public function __doRequest($request, $location, $action, $version)
 {
     $this->lastRequest = strval($request);
     $GLOBALS['HTTP_RAW_POST_DATA'] = $this->lastRequest;
     $this->browser->setHttpHeader('soapaction', strval($action));
     sfFilter::$filterCalled = array();
     $this->lastResponse = strval($this->browser->post('/')->getResponse()->getContent());
     return $this->lastResponse;
 }