コード例 #1
0
ファイル: page.php プロジェクト: robomc/solr-tests
 /**
  *    Extracts all of the response information.
  *    @param SimpleHttpResponse $response    Response being parsed.
  *    @access private
  */
 protected function extractResponse($response)
 {
     $this->transport_error = $response->getError();
     $this->raw = $response->getContent();
     $this->sent = $response->getSent();
     $this->headers = $response->getHeaders();
     $this->method = $response->getMethod();
     $this->url = $response->getUrl();
     $this->request_data = $response->getRequestData();
 }
コード例 #2
0
ファイル: page.php プロジェクト: Spark-Eleven/revive-adserver
 /**
  *    Extracts all of the response information.
  *    @param SimpleHttpResponse $response    Response being parsed.
  *    @access private
  */
 function _extractResponse($response)
 {
     $this->_transport_error = $response->getError();
     $this->_raw = $response->getContent();
     $this->_sent = $response->getSent();
     $this->_headers = $response->getHeaders();
     $this->_method = $response->getMethod();
     $this->_url = $response->getUrl();
     $this->_request_data = $response->getRequestData();
 }
コード例 #3
0
ファイル: http_test.php プロジェクト: VasuLief/simpletest
 public function testBadRequest()
 {
     $socket = new MockSimpleSocket();
     $socket->setReturnValue('getSent', '');
     $response = new SimpleHttpResponse($socket, new SimpleUrl('here'), new SimpleGetEncoding());
     $this->assertTrue($response->isError());
     $this->assertPattern('/Nothing fetched/', $response->getError());
     $this->assertIdentical($response->getContent(), false);
     $this->assertIdentical($response->getSent(), '');
 }