Block Editor: Fix unit tests after new blocks addition.

- Regenerate the REST API fixtures.
 - Remove the block registration hooks in the unit tests.

Refs #46429.


git-svn-id: https://develop.svn.wordpress.org/trunk@44812 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Riad Benguella
2019-03-07 11:53:15 +00:00
parent 0ad7b1a169
commit ccfb76d26f
4 changed files with 169 additions and 1 deletions

View File

@@ -237,8 +237,12 @@ tests_add_filter( 'send_auth_cookies', '__return_false' );
*/
function _unhook_block_registration() {
remove_action( 'init', 'register_block_core_archives' );
remove_action( 'init', 'register_block_core_calendar' );
remove_action( 'init', 'register_block_core_categories' );
remove_action( 'init', 'register_block_core_latest_posts' );
remove_action( 'init', 'register_block_core_rss' );
remove_action( 'init', 'register_block_core_search' );
remove_action( 'init', 'register_block_core_shortcode' );
remove_action( 'init', 'register_block_core_tag_cloud' );
}
tests_add_filter( 'init', '_unhook_block_registration', 1000 );