diff --git a/src/WPPPB/Loader.php b/src/WPPPB/Loader.php index 999be73..ab2b41c 100644 --- a/src/WPPPB/Loader.php +++ b/src/WPPPB/Loader.php @@ -227,12 +227,21 @@ public function locate_wp_tests_config() { public function phpunit_compat() { if ( class_exists( 'PHPUnit\Runner\Version' ) ) { + /** * Compatibility with PHPUnit 6+. * * @since 0.3.2 */ require_once $this->get_wp_tests_dir() . '/includes/phpunit6-compat.php'; + + if ( version_compare( PHPUnit\Runner\Version::id(), '6.0', '>=' ) ) { + + class_alias( + 'PHPUnit\Framework\Constraint\Constraint' + , 'PHPUnit_Framework_Constraint' + ); + } } }