dev/core#980 update phpunit extends class to support later versions
authoreileen <emcnaughton@wikimedia.org>
Sat, 25 May 2019 22:50:31 +0000 (10:50 +1200)
committereileen <emcnaughton@wikimedia.org>
Sat, 25 May 2019 22:50:31 +0000 (10:50 +1200)
Per https://engineering.facile.it/blog/eng/phpunit-upgrade-namespace/ this works with phpunit 4.8 +

Phpunit support for php versions is here https://phpunit.de/supported-versions.html

Basically we need phpunit 7 to support php 7.3 - which we should be adding to our
test suite now. It's hard to make a case that we still need to support phpunit 4.8 - let
alone versions before that - 5.7 still covers php 5.6 which we need for some of our current branches.

Unit testing on master would ideally switch up to a supported version of phpunit - 7 or 8

tests/phpunit/CiviTest/CiviUnitTestCase.php

index 67cda7b0d7811448b38f8716d610d72f40cb5baa..2c9b47add8f17b780828bed8b874200ff07b593b 100644 (file)
@@ -52,7 +52,7 @@ define('API_LATEST_VERSION', 3);
  *  Common functions for unit tests
  * @package CiviCRM
  */
-class CiviUnitTestCase extends PHPUnit_Framework_TestCase {
+class CiviUnitTestCase extends PHPUnit\Framework\TestCase {
 
   use \Civi\Test\Api3DocTrait;
   use \Civi\Test\GenericAssertionsTrait;