include_once __DIR__ . '/PolyfillTestCase.php';
+use PHPUnit\Runner\BaseTestRunner;
+
/**
* Tests involving parsing of xml and handling of xmlrpc values
*/
return;
$out = ob_get_clean();
$status = $this->getStatus();
- if ($status == PHPUnit_Runner_BaseTestRunner::STATUS_ERROR
- || $status == PHPUnit_Runner_BaseTestRunner::STATUS_FAILURE) {
+ if ($status == BaseTestRunner::STATUS_ERROR
+ || $status == BaseTestRunner::STATUS_FAILURE) {
echo $out;
}
}
include_once __DIR__ . '/PolyfillTestCase.php';
+use PHPUnit\Runner\BaseTestRunner;
+
/**
* Tests involving requests sent to non-existing servers
*/
return;
$out = ob_get_clean();
$status = $this->getStatus();
- if ($status == PHPUnit_Runner_BaseTestRunner::STATUS_ERROR
- || $status == PHPUnit_Runner_BaseTestRunner::STATUS_FAILURE) {
+ if ($status == BaseTestRunner::STATUS_ERROR
+ || $status == BaseTestRunner::STATUS_FAILURE) {
echo $out;
}
}
include_once __DIR__ . '/PolyfillTestCase.php';
+use PHPUnit\Extensions\SeleniumCommon\RemoteCoverage;
use PHPUnit\Framework\TestResult;
+use PHPUnit\Runner\BaseTestRunner;
/**
* Tests which involve interaction between the client and the server.
protected $coverageScriptUrl;
/**
- * @todo instead of overriding run via _fail, implement PHPUnit_Framework_TestListener - IFF there is such an API portable across PHPUnit 5 to 9...
+ * @todo instead of overriding fail via _fail, implement Yoast\PHPUnitPolyfills\TestListeners\TestListenerDefaultImplementation
*/
public static function _fail($message = '')
{
* @return TestResult
* @throws Exception
*
- * @todo instead of overriding run via _run, subclass PHPUnit_Extensions_TestDecorator - IFF there is such an API portable across PHPUnit 5 to 9...
+ * @todo instead of overriding run via _run, try to achieve this by implementing Yoast\PHPUnitPolyfills\TestListeners\TestListenerDefaultImplementation
*/
public function _run($result = NULL)
{
parent::_run($result);
if ($this->collectCodeCoverageInformation) {
- $coverage = new PHPUnit_Extensions_SeleniumCommon_RemoteCoverage(
+ $coverage = new RemoteCoverage(
$this->coverageScriptUrl,
$this->testId
);
return;
$out = ob_get_clean();
$status = $this->getStatus();
- if ($status == PHPUnit_Runner_BaseTestRunner::STATUS_ERROR
- || $status == PHPUnit_Runner_BaseTestRunner::STATUS_FAILURE) {
+ if ($status == BaseTestRunner::STATUS_ERROR
+ || $status == BaseTestRunner::STATUS_FAILURE) {
echo $out;
}
}
include_once __DIR__ . '/PolyfillTestCase.php';
+use PHPUnit\Extensions\SeleniumCommon\RemoteCoverage;
+
+/**
+ * @todo rename
+ */
abstract class PhpXmlRpc_LocalFileTestCase extends PhpXmlRpc_PolyfillTestCase
{
public $args = array();
* Reimplemented to allow us to collect code coverage info for the target php files executed via an http request.
* Code taken from PHPUnit_Extensions_Selenium2TestCase
*
- * @todo instead of overriding run via _run, subclass PHPUnit_Extensions_TestDecorator - IFF there is such an API portable across PHPUnit 5 to 9...
+ * @todo instead of overriding run via _run, try to achieve this by implementing Yoast\PHPUnitPolyfills\TestListeners\TestListenerDefaultImplementation
*/
public function _run($result = NULL)
{
parent::_run($result);
if ($this->collectCodeCoverageInformation) {
- $coverage = new PHPUnit_Extensions_SeleniumCommon_RemoteCoverage(
+ $coverage = new RemoteCoverage(
$this->coverageScriptUrl,
$this->testId
);
return $page;
}
-
}
use PHPUnit\Runner\Version as PHPUnit_Version;
-/// @todo we should do the opposite - write test code to the 'new' phpunit API, and alias it to the 'old' class name
-/// when old classes are present...
-if (!class_exists('PHPUnit_Extensions_SeleniumCommon_RemoteCoverage')) {
- class PHPUnit_Extensions_SeleniumCommon_RemoteCoverage extends PHPUnit\Extensions\SeleniumCommon\RemoteCoverage {}
+if ( class_exists( 'PHPUnit_Extensions_SeleniumCommon_RemoteCoverage' ) === true
+ && class_exists( 'PHPUnit\Extensions\SeleniumCommon\RemoteCoverage' ) === false
+) {
+ class_alias( 'PHPUnit_Extensions_SeleniumCommon_RemoteCoverage', 'PHPUnit\Extensions\SeleniumCommon\RemoteCoverage' );
+}
+
+if ( class_exists( 'PHPUnit_Runner_BaseTestRunner' ) === true
+ && class_exists( 'PHPUnit\Runner\BaseTestRunner' ) === false
+) {
+ class_alias( 'PHPUnit_Runner_BaseTestRunner', 'PHPUnit\Runner\BaseTestRunner' );
}
if (class_exists(PHPUnit_Version::class) === false || version_compare(PHPUnit_Version::id(), '8.0.0', '<')) {
*
* @copyright (C) 2007-2020 G. Giunta
* @license code licensed under the BSD License: see file license.txt
+ *
+ * @todo rename both the class and the file. PhpXmlRpc_TestArgParser ?
**/
class argParser
{