Jyxo\Rpc\Server::process PHP Method

process() abstract public method

Processes a request and sends a RPC response.
abstract public process ( )
    public abstract function process();

Usage Example

Exemplo n.º 1
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();
 }