mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 20:30:23 +00:00
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. git-svn-id: https://develop.svn.wordpress.org/trunk@47880 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -10,8 +10,7 @@ function tests_get_phpunit_version() {
|
||||
if ( class_exists( 'PHPUnit_Runner_Version' ) ) {
|
||||
$version = PHPUnit_Runner_Version::id();
|
||||
} elseif ( class_exists( 'PHPUnit\Runner\Version' ) ) {
|
||||
// Must be parsable by PHP 5.2.x.
|
||||
$version = call_user_func( 'PHPUnit\Runner\Version::id' );
|
||||
$version = PHPUnit\Runner\Version::id();
|
||||
} else {
|
||||
$version = 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user