Skip to content

Commit 1eeace6

Browse files
author
Felix Arntz
committed
Do not load phpunit6-compat.php test bootstrap file when unnecessary to prevent issues on PHP 5.2 without namespace support.
1 parent 51dddef commit 1eeace6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/phpunit/bootstrap.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
}
2323

2424
// WordPress versions before 4.8 will be incompatible with newer PHPUnit versions.
25-
if ( version_compare( getenv( 'WP_VERSION' ), '4.8', '<' ) ) {
25+
if ( version_compare( getenv( 'WP_VERSION' ), '4.8', '<' ) && class_exists( 'PHPUnit\Runner\Version' ) ) {
2626
require_once dirname( __FILE__ ) . '/phpunit6-compat.php';
2727
}
2828

0 commit comments

Comments
 (0)