script:
- ./vendor/bin/phpunit -v $PHPUNIT_OPTS tests
- - python3 extras/test.py
- - perl extras/test.pl
+ - python3 demo/client/python/test.py
+ - perl extras/client/perl/test.pl
after_failure:
# Troubleshoot test env build problems
* minor improvements in the debugger to allow easier integration of phpxmlrpc/jsonrpc and friends
-* removed obsolete files from the 'extras' directory and updated the demo perl and python files
+* removed obsolete files from the 'extras' folder; updated and moved to the 'demo' folders the perl and python
+ client scripts; moved benchmark.php and verify_compat.php to the 'extras' folder
XML-RPC for PHP version 4.4.3 - 2020/12/17
// server sent a Continue header without any (valid) content following...
// give the client a chance to know it
if (!$pos && !is_int($pos)) {
- // works fine in php 3, 4 and 5
+ /// @todo this construct works fine in php 3, 4 and 5 - 8; would it not be enough to have !== false now ?
break;
}
<?php
-include_once __DIR__ . '/LocalFileTestCase.php';
+include_once __DIR__ . '/WebTestCase.php';
/**
* Tests for php files in the 'demo' directory
*/
-class DemoFilesTest extends PhpXmlRpc_LocalFileTestCase
+class DemoFilesTest extends PhpXmlRpc_WebTestCase
{
public function set_up()
{
<?php
-include_once __DIR__ . '/LocalFileTestCase.php';
+include_once __DIR__ . '/WebTestCase.php';
-class DebuggerTest extends PhpXmlRpc_LocalFileTestCase
+class DebuggerTest extends PhpXmlRpc_WebTestCase
{
public function set_up()
{
<?php
-include_once __DIR__ . '/LocalFileTestCase.php';
+include_once __DIR__ . '/WebTestCase.php';
/**
* Tests for php files in the 'extras' directory
*
*/
-class ExtraFilesTest extends PhpXmlRpc_LocalFileTestCase
+class ExtraFilesTest extends PhpXmlRpc_WebTestCase
{
public function set_up()
{
$this->args = argParser::getArgs();
- $this->baseUrl = $this->args['HTTPSERVER'] . str_replace( '/demo/server/server.php', '/tests/', $this->args['HTTPURI'] );
+ $this->baseUrl = $this->args['HTTPSERVER'] . str_replace( '/demo/server/server.php', '/extras/', $this->args['HTTPURI'] );
$this->coverageScriptUrl = 'http://' . $this->args['HTTPSERVER'] . '/' . str_replace( '/demo/server/server.php', 'tests/phpunit_coverage.php', $this->args['HTTPURI'] );
}
use PHPUnit\Extensions\SeleniumCommon\RemoteCoverage;
-/**
- * @todo rename
- */
-abstract class PhpXmlRpc_LocalFileTestCase extends PhpXmlRpc_PolyfillTestCase
+abstract class PhpXmlRpc_WebTestCase extends PhpXmlRpc_PolyfillTestCase
{
public $args = array();
return $result;
}
- protected function request($file, $method = 'GET', $payload = '', $emptyPageOk = false)
+ /**
+ * @param string $path
+ * @param string $method
+ * @param string $payload
+ * @param false $emptyPageOk
+ * @return bool|string
+ */
+ protected function request($path, $method = 'GET', $payload = '', $emptyPageOk = false)
{
- $url = $this->baseUrl . $file;
+ $url = $this->baseUrl . $path;
$ch = curl_init($url);
curl_setopt_array($ch, array(
if (!isset($HTTPURI) || $HTTPURI == '') {
// GUESTIMATE the url of local demo server
- // play nice to php 3 and 4-5 in retrieving URL of server.php
+ // play nice to php 4 and 5 in retrieving URL of server.php
/// @todo filter out query string from REQUEST_URI
+ /// @todo review this code...
if (isset($REQUEST_URI)) {
$HTTPURI = str_replace('/tests/testsuite.php', '/demo/server/server.php', $REQUEST_URI);
$HTTPURI = str_replace('/testsuite.php', '/server.php', $HTTPURI);
- $HTTPURI = str_replace('/tests/benchmark.php', '/demo/server/server.php', $HTTPURI);
+ $HTTPURI = str_replace('/extras/benchmark.php', '/demo/server/server.php', $HTTPURI);
$HTTPURI = str_replace('/benchmark.php', '/server.php', $HTTPURI);
} elseif (isset($_SERVER['PHP_SELF']) && isset($_SERVER['REQUEST_METHOD'])) {
$HTTPURI = str_replace('/tests/testsuite.php', '/demo/server/server.php', $_SERVER['PHP_SELF']);
$HTTPURI = str_replace('/testsuite.php', '/server.php', $HTTPURI);
- $HTTPURI = str_replace('/tests/benchmark.php', '/demo/server/server.php', $HTTPURI);
+ $HTTPURI = str_replace('/extras/benchmark.php', '/demo/server/server.php', $HTTPURI);
$HTTPURI = str_replace('/benchmark.php', '/server.php', $HTTPURI);
} else {
$HTTPURI = '/demo/server/server.php';