Make WordPress Core


Ignore:
Timestamp:
06/01/2020 07:41:50 PM (4 years ago)
Author:
ocean90
Message:

Build/Test Tools: Let WP_UnitTestCase_Base extend the namespaced version of PHPUnit's test case class.

With the minimum PHP version requirement set to 5.6 we're now able to use namespaces by default. This replaces PHPUnit_Framework_TestCase with PHPUnit\Framework\TestCase for WP_UnitTestCase_Base to solve autocompletion issues with code editors when using more recent PHPUnit versions. PHPUnit\Framework\TestCase is available since PHPUnit 5.4 and now the minimum required PHPUnit version.

Fixes #50236.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/includes/functions.php

    r47250 r47880  
    1111        $version = PHPUnit_Runner_Version::id();
    1212    } elseif ( class_exists( 'PHPUnit\Runner\Version' ) ) {
    13         // Must be parsable by PHP 5.2.x.
    14         $version = call_user_func( 'PHPUnit\Runner\Version::id' );
     13        $version = PHPUnit\Runner\Version::id();
    1514    } else {
    1615        $version = 0;
Note: See TracChangeset for help on using the changeset viewer.