/**
* 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();
}