示例#1
0
 /**
  * Sets content.
  *
  * @param string $content Content
  */
 public static function setContent($content)
 {
     self::$content = (string) $content;
 }
示例#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();
 }