X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=tests%2FPolyfillTestCase.php;h=24957faa35adcb805b7a7c3ff7e485e1d031324c;hb=526b0d2257ba1faa0cfcbdb0515d4f395f22ce2c;hp=14e42c9d3cd362e1b634376dcf9b1e9f92f9da90;hpb=143708b6e4d928d32a0a22af28a3bd54c7d8e5bc;p=plcapi.git diff --git a/tests/PolyfillTestCase.php b/tests/PolyfillTestCase.php index 14e42c9..24957fa 100644 --- a/tests/PolyfillTestCase.php +++ b/tests/PolyfillTestCase.php @@ -2,10 +2,16 @@ 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', '<')) {