Skip to content

Commit

Permalink
Fix unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
youknowriad committed Feb 7, 2024
1 parent 1dc8bb3 commit 1fa2ff5
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/phpunit/includes/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -351,3 +351,14 @@ function _unhook_block_registration() {
remove_action( 'init', '_register_block_bindings_post_meta_source' );
}
tests_add_filter( 'init', '_unhook_block_registration', 1000 );

/**
* After the init action has been run once, trying to re-register font collections can cause
* errors. To avoid this, unhook the font registration functions.
*
* @since 6.5.0
*/
function _unhook_font_registration() {
remove_action( 'init', '_register_font_collections' );
}
tests_add_filter( 'init', '_unhook_font_registration', 1000 );

0 comments on commit 1fa2ff5

Please sign in to comment.