Skip to content

Commit

Permalink
Merge pull request #76 from wp-blocks/PHPUnit-VVV
Browse files Browse the repository at this point in the history
should close #75
  • Loading branch information
gardenboi authored Dec 12, 2023
2 parents 2b3864c + 75c484b commit d07aaaf
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/PhpUnit/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,3 +75,10 @@ function fail_if_died( $message ) {

// Use existing behavior for wp_die during actual test execution.
remove_filter( 'wp_die_handler', 'fail_if_died' );

// pre-load add_filter if it's not already loaded by PHPUnit
if (!function_exists('add_filter')) {
tests_add_filter('add_filter', 'fail_if_died');
}


0 comments on commit d07aaaf

Please sign in to comment.