* @license code licensed under the BSD License: see file license.txt
*
* @todo add a test for php output buffering?
+ * @todo check for presence of specific curl options, such as fe. the HTTP2 ones
+ * @todo check for presence of mbstring
+ * @todo check for presence of the xmlrpc extension
*/
function phpxmlrpc_verify_compat($mode = 'client')
font-family: Arial, Verdana, Geneva, sans-serif;
font-size: small;
}
-
table {
border: 1px solid gray;
padding: 0;
}
-
thead {
background-color: silver;
color: black;
}
-
td {
margin: 0;
padding: 0.5em;
}
-
tbody td {
border-top: 1px solid gray;
}
-
.res0 {
background-color: red;
color: black;
border-right: 1px solid gray;
}
-
.res1 {
background-color: yellow;
color: black;
border-right: 1px solid gray;
}
-
.res2 {
background-color: green;
color: black;
border-right: 1px solid gray;
}
-
.result {
white-space: pre;
}
$this->client->port = $server[1];
}
$this->client->server = $server[0];
- //$this->client->path = str_replace('/demo/server/server.php', '/tests/index.php?demo=server/server.php', $this->args['HTTPURI']);
$this->client->path = $this->args['HTTPURI'];
$r = $this->client->send($m, 5, 'http11');
{
$this->args = argParser::getArgs();
- //$uri = str_replace('/demo/server/server.php', '/tests/index.php?demo=server/server.php', $this->args['HTTPURI']);
$server = explode(':', $this->args['HTTPSERVER']);
if (count($server) > 1) {
$this->client = new xmlrpc_client($this->args['HTTPURI'], $server[0], $server[1]);
<?php
-// File accessed by http requests as part of the test suite, enabling testing of demo, debugger, extras files.
-// It triggers generation of code-coverage information
+// File accessed by http requests sent by the test suite, enabling testing of demo, debugger, extras files.
+// It makes all errors visible, triggers generation of code-coverage information, and runs the target file,
+// which is specified as GET param.
// Make errors visible
ini_set('display_errors', true);
error_reporting(E_ALL);
-// Set up a constant which can be used by demo code to tell if the testuite is in action
+// Set up a constant which can be used by demo code to tell if the testuite is in action.
+// We use a constant because it can not be injected via GET/POST/COOKIE/ENV
const TESTMODE = true;
// Out-of-band information: let the client manipulate the page operations
if (isset($_COOKIE['PHPUNIT_SELENIUM_TEST_ID']) && extension_loaded('xdebug')) {
+ // NB: this has to be kept in sync with phunit_coverage.php
$GLOBALS['PHPUNIT_COVERAGE_DATA_DIRECTORY'] = '/tmp/phpxmlrpc_coverage';
if (!is_dir($GLOBALS['PHPUNIT_COVERAGE_DATA_DIRECTORY'])) {
mkdir($GLOBALS['PHPUNIT_COVERAGE_DATA_DIRECTORY']);
//'LOCALPATH' => __DIR__,
);
- // check for command line (env vars) vs. web page input params
+ // check for command line params (passed as env vars) vs. web page input params (passed as GET/POST)
+ // Note that the only usecase for web-page mode is when this is used by benchmark.php
if (!isset($_SERVER['REQUEST_METHOD'])) {
foreach($_SERVER as $key => $val) {
if (array_key_exists($key, $args)) {
$coverageFile = realpath(__DIR__ . "/../vendor/phpunit/phpunit-selenium/PHPUnit/Extensions/SeleniumCommon/phpunit_coverage.php");
-// has to be the same value as used in server.php
+// has to be the same value as used in index.php
$GLOBALS['PHPUNIT_COVERAGE_DATA_DIRECTORY'] = '/tmp/phpxmlrpc_coverage';
if (!is_dir($GLOBALS['PHPUNIT_COVERAGE_DATA_DIRECTORY'])) {