From a92b4a31828135ed4744f6301871e04c101da6a0 Mon Sep 17 00:00:00 2001 From: gggeek <giunta.gaetano@gmail.com> Date: Fri, 27 Jan 2023 10:04:13 +0000 Subject: [PATCH] test nitpicks --- tests/02ValueTest.php | 4 ++-- tests/03MessagesTest.php | 4 ++-- tests/04ParsingTest.php | 4 ++-- tests/06EncoderTest.php | 4 ++-- tests/07ClientTest.php | 4 ++-- tests/{LogAwareTestCase.php => LoggerAwareTestCase.php} | 2 +- tests/PolyfillTestCase7.php | 1 + tests/PolyfillTestCase8.php | 1 + tests/ServerAwareTestCase.php | 4 ++-- 9 files changed, 15 insertions(+), 13 deletions(-) rename tests/{LogAwareTestCase.php => LoggerAwareTestCase.php} (94%) diff --git a/tests/02ValueTest.php b/tests/02ValueTest.php index 73ba4b76..9aa505f2 100644 --- a/tests/02ValueTest.php +++ b/tests/02ValueTest.php @@ -1,12 +1,12 @@ <?php -include_once __DIR__ . '/LogAwareTestCase.php'; +include_once __DIR__ . '/LoggerAwareTestCase.php'; /** * Tests involving the Value class. * NB: these tests do not involve the parsing of xml into Value objects - look in 03ParsingTest for that */ -class ValueTest extends PhpXmlRpc_LogAwareTestCase +class ValueTest extends PhpXmlRpc_LoggerAwareTestCase { public function testMinusOneString() { diff --git a/tests/03MessagesTest.php b/tests/03MessagesTest.php index cb4a70bb..66712937 100644 --- a/tests/03MessagesTest.php +++ b/tests/03MessagesTest.php @@ -1,11 +1,11 @@ <?php -include_once __DIR__ . '/LogAwareTestCase.php'; +include_once __DIR__ . '/LoggerAwareTestCase.php'; /** * Tests involving Requests and Responses, except for the parsing part */ -class MessagesTest extends PhpXmlRpc_LogAwareTestCase +class MessagesTest extends PhpXmlRpc_LoggerAwareTestCase { public function testSerializePHPValResponse() { diff --git a/tests/04ParsingTest.php b/tests/04ParsingTest.php index 50b2fe4e..1911c9d2 100644 --- a/tests/04ParsingTest.php +++ b/tests/04ParsingTest.php @@ -1,13 +1,13 @@ <?php -include_once __DIR__ . '/LogAwareTestCase.php'; +include_once __DIR__ . '/LoggerAwareTestCase.php'; /** * Tests involving xml parsing. * * @todo some tests are here even though they logically belong elsewhere... */ -class ParsingTest extends PhpXmlRpc_LogAwareTestCase +class ParsingTest extends PhpXmlRpc_LoggerAwareTestCase { protected function newRequest($methodName, $params = array()) { diff --git a/tests/06EncoderTest.php b/tests/06EncoderTest.php index 568256b1..bb5c02b9 100644 --- a/tests/06EncoderTest.php +++ b/tests/06EncoderTest.php @@ -1,6 +1,6 @@ <?php -include_once __DIR__ . '/LogAwareTestCase.php'; +include_once __DIR__ . '/LoggerAwareTestCase.php'; /** * Tests involving automatic encoding/decoding of php values into xmlrpc values (the Encoder class). @@ -8,7 +8,7 @@ include_once __DIR__ . '/LogAwareTestCase.php'; * @todo add tests for encoding options: 'encode_php_objs', 'auto_dates', 'null_extension' and 'extension_api' * @todo add tests for php_xmlrpc_decode options */ -class EncoderTest extends PhpXmlRpc_LogAwareTestCase +class EncoderTest extends PhpXmlRpc_LoggerAwareTestCase { public function testEncodeArray() { diff --git a/tests/07ClientTest.php b/tests/07ClientTest.php index 6faac336..c7107ed6 100644 --- a/tests/07ClientTest.php +++ b/tests/07ClientTest.php @@ -1,11 +1,11 @@ <?php -include_once __DIR__ . '/LogAwareTestCase.php'; +include_once __DIR__ . '/LoggerAwareTestCase.php'; /** * Tests involving the Client class (and no server). */ -class ClientTes extends PhpXmlRpc_LogAwareTestCase +class ClientTes extends PhpXmlRpc_LoggerAwareTestCase { /** @var xmlrpc_client $client */ public $client = null; diff --git a/tests/LogAwareTestCase.php b/tests/LoggerAwareTestCase.php similarity index 94% rename from tests/LogAwareTestCase.php rename to tests/LoggerAwareTestCase.php index d0dec6c1..4c3051ea 100644 --- a/tests/LogAwareTestCase.php +++ b/tests/LoggerAwareTestCase.php @@ -9,7 +9,7 @@ include_once __DIR__ . '/PolyfillTestCase.php'; use PHPUnit\Runner\BaseTestRunner; -abstract class PhpXmlRpc_LogAwareTestCase extends PhpXmlRpc_PolyfillTestCase +abstract class PhpXmlRpc_LoggerAwareTestCase extends PhpXmlRpc_PolyfillTestCase { protected $args = array(); diff --git a/tests/PolyfillTestCase7.php b/tests/PolyfillTestCase7.php index 112f6066..9212512f 100644 --- a/tests/PolyfillTestCase7.php +++ b/tests/PolyfillTestCase7.php @@ -2,6 +2,7 @@ use Yoast\PHPUnitPolyfills\TestCases\TestCase; +// allow hooking code to run within `run` and `fail` via defining `_run` and `_fail` in subclasses abstract class PhpXmlRpc_PolyfillTestCase extends TestCase { public function _run($result = null) { diff --git a/tests/PolyfillTestCase8.php b/tests/PolyfillTestCase8.php index 5c8711a0..a7fcecac 100644 --- a/tests/PolyfillTestCase8.php +++ b/tests/PolyfillTestCase8.php @@ -3,6 +3,7 @@ use PHPUnit\Framework\TestResult as PHPUnit_Framework_TestResult; use Yoast\PHPUnitPolyfills\TestCases\TestCase; +// allow hooking code to run within `run` and `fail` via defining `_run` and `_fail` in subclasses abstract class PhpXmlRpc_PolyfillTestCase extends TestCase { public function _run($result = null) { diff --git a/tests/ServerAwareTestCase.php b/tests/ServerAwareTestCase.php index 02bbb267..d6633834 100644 --- a/tests/ServerAwareTestCase.php +++ b/tests/ServerAwareTestCase.php @@ -1,11 +1,11 @@ <?php -include_once __DIR__ . '/LogAwareTestCase.php'; +include_once __DIR__ . '/LoggerAwareTestCase.php'; use PHPUnit\Extensions\SeleniumCommon\RemoteCoverage; use PHPUnit\Framework\TestResult; -abstract class PhpXmlRpc_ServerAwareTestCase extends PhpXmlRpc_LogAwareTestCase +abstract class PhpXmlRpc_ServerAwareTestCase extends PhpXmlRpc_LoggerAwareTestCase { /** @var string */ protected $baseUrl; -- 2.47.0