From 33ef6f5d30905b8ff2b5a9a86a3c1a4e94b845a3 Mon Sep 17 00:00:00 2001 From: gggeek Date: Sun, 8 Jan 2023 16:30:19 +0000 Subject: [PATCH] whitespace; comments --- extras/verify_compat.php | 11 +++-------- tests/4ClientTest.php | 1 - tests/5ServerTest.php | 1 - tests/index.php | 9 ++++++--- tests/parse_args.php | 3 ++- tests/phpunit_coverage.php | 2 +- 6 files changed, 12 insertions(+), 15 deletions(-) diff --git a/extras/verify_compat.php b/extras/verify_compat.php index c8ef34d3..9157a562 100644 --- a/extras/verify_compat.php +++ b/extras/verify_compat.php @@ -7,6 +7,9 @@ * @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') @@ -108,44 +111,36 @@ 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; } diff --git a/tests/4ClientTest.php b/tests/4ClientTest.php index f2f5627a..a2942b4c 100644 --- a/tests/4ClientTest.php +++ b/tests/4ClientTest.php @@ -89,7 +89,6 @@ class ClientTest extends PhpXmlRpc_PolyfillTestCase $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'); diff --git a/tests/5ServerTest.php b/tests/5ServerTest.php index 8ba0d539..23e80942 100644 --- a/tests/5ServerTest.php +++ b/tests/5ServerTest.php @@ -95,7 +95,6 @@ class ServerTest extends PhpXmlRpc_PolyfillTestCase { $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]); diff --git a/tests/index.php b/tests/index.php index a14defa7..c1d63a2a 100644 --- a/tests/index.php +++ b/tests/index.php @@ -1,17 +1,20 @@ __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)) { diff --git a/tests/phpunit_coverage.php b/tests/phpunit_coverage.php index 75941e94..f49f7c79 100644 --- a/tests/phpunit_coverage.php +++ b/tests/phpunit_coverage.php @@ -8,7 +8,7 @@ $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'])) { -- 2.47.0