Skip to content

Commit

Permalink
Merge pull request #66 from Yoast/feature/tests-minor-stabilization
Browse files Browse the repository at this point in the history
Test bootstrap: declare the `PHPUNIT_TESTSUITE` constant
  • Loading branch information
jrfnl committed Nov 18, 2021
2 parents 8a5d6e4 + 6732940 commit 0b45bcc
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 0b45bcc

Please sign in to comment.