mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-07-01 15:50:09 +00:00
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:
@@ -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 );
|
||||
|
||||
@@ -122,9 +122,13 @@ class WP_Test_REST_Schema_Initialization extends WP_Test_REST_TestCase {
|
||||
'/wp/v2/block-renderer/(?P<name>core/block)',
|
||||
'/wp/v2/block-renderer/(?P<name>core/latest-comments)',
|
||||
'/wp/v2/block-renderer/(?P<name>core/archives)',
|
||||
'/wp/v2/block-renderer/(?P<name>core/calendar)',
|
||||
'/wp/v2/block-renderer/(?P<name>core/categories)',
|
||||
'/wp/v2/block-renderer/(?P<name>core/latest-posts)',
|
||||
'/wp/v2/block-renderer/(?P<name>core/rss)',
|
||||
'/wp/v2/block-renderer/(?P<name>core/search)',
|
||||
'/wp/v2/block-renderer/(?P<name>core/shortcode)',
|
||||
'/wp/v2/block-renderer/(?P<name>core/tag-cloud)',
|
||||
'/wp/v2/settings',
|
||||
'/wp/v2/themes',
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user