diff --git a/tests/bootstrap.php b/tests/bootstrap.php index 95883b1..3ca3a3a 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -47,6 +47,15 @@ static function ( $fqClassName ) { die( 1 ); } +/* + * Define the constant because our tests are running PHPUnit test cases themselves. + * This will prevent some tests being marked as "risky" on old PHPUnit versions for + * closing buffers. + */ +if ( \defined( 'PHPUNIT_TESTSUITE' ) === false ) { + \define( 'PHPUNIT_TESTSUITE', true ); +} + /* * Create a number of class aliases for PHPUnit native classes which have been * renamed over time and are only used in the unit tests.