예제 #1
0
 protected function performTestSetRun(array $request)
 {
     ezcWebdavTestTransportInjector::reset();
     ezcWebdavTestTransportInjector::$requestBody = $request['body'];
     $_SERVER = $request['server'];
     // ini_set( 'xdebug.collect_return', 1 );
     // xdebug_start_trace( './traces/' . basename( $testSetName ) );
     $this->server->handle($this->backend);
     // xdebug_stop_trace();
     $response['status'] = ezcWebdavTestTransportInjector::$responseStatus;
     $response['headers'] = ezcWebdavTestTransportInjector::$responseHeaders;
     $response['body'] = ezcWebdavTestTransportInjector::$responseBody;
     return $response;
 }
예제 #2
0
파일: client_test.php 프로젝트: bmdevel/ezc
 protected function performTestSetRun(array $request)
 {
     $GLOBALS['EZC_WEBDAV_TRANSPORT_TEST_BODY'] = $request['body'];
     $_SERVER = $request['server'];
     // ini_set( 'xdebug.collect_return', 1 );
     // xdebug_start_trace( './traces/' . basename( $testSetName ) );
     $this->server->handle($this->backend);
     // xdebug_stop_trace();
     $response['body'] = $GLOBALS['EZC_WEBDAV_TRANSPORT_TEST_RESPONSE_BODY'];
     $response['headers'] = $GLOBALS['EZC_WEBDAV_TRANSPORT_TEST_RESPONSE_HEADERS'];
     $response['status'] = $GLOBALS['EZC_WEBDAV_TRANSPORT_TEST_RESPONSE_STATUS'];
     // Reset globals
     unset($GLOBALS['EZC_WEBDAV_TRANSPORT_TEST_BODY']);
     unset($GLOBALS['EZC_WEBDAV_TRANSPORT_TEST_RESPONSE_BODY']);
     unset($GLOBALS['EZC_WEBDAV_TRANSPORT_TEST_RESPONSE_HEADERS']);
     unset($GLOBALS['EZC_WEBDAV_TRANSPORT_TEST_RESPONSE_STATUS']);
     return $response;
 }
예제 #3
0
 /**
  * Runs the server.
  * 
  * @return void
  */
 public function run()
 {
     $GLOBALS['EZC_WEBDAV_ERROR'] = array();
     set_error_handler(array($this, 'handleErrors'));
     try {
         $this->server->handle($this->backend);
     } catch (Exception $e) {
         $this->exceptions[] = $e;
     }
     restore_error_handler();
 }