저자: Jaroslav Hanslík
예제 #1
0
파일: Server.php 프로젝트: jyxo/php
 /**
  * Destroys a class instance.
  */
 public function __destruct()
 {
     parent::__destruct();
     if (is_resource($this->server)) {
         xmlrpc_server_destroy($this->server);
     }
 }
예제 #2
0
 /**
  * Checks server response.
  *
  * @param string $test
  */
 private function checkServerOutput($test)
 {
     // Prepares the server
     require_once $this->getFilePath('TestPhpInputStream.php');
     \TestPhpInputStream::register();
     \TestPhpInputStream::setContent(file_get_contents($this->getFilePath($test . '.' . $this->getFileExtension())));
     // We need to capture the output
     ob_start();
     // On purpose @ because of the "headers already sent" warning
     @$this->rpc->process();
     $output = ob_get_clean();
     $this->assertStringEqualsFile($this->getFilePath($test . '-expected.' . $this->getFileExtension()), $output);
     // Server cleanup
     \TestPhpInputStream::unregister();
 }