From 1118e37f48ff184c40bc4e593ae13b1fbe4b8001 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Fri, 8 Sep 2023 10:01:14 +0000 Subject: [PATCH] Coding Standards: Remove superfluous blank lines at the end of various functions. Note: This is enforced by WPCS 3.0.0. Follow-up to [56536], [56547]. Props jrf. See #59161, #58831. git-svn-id: https://develop.svn.wordpress.org/trunk@56548 602fd350-edb4-49c9-b593-d223f7449a82 --- .../includes/class-wp-filesystem-base.php | 1 - .../includes/class-wp-terms-list-table.php | 1 - src/wp-admin/includes/dashboard.php | 1 - src/wp-admin/includes/image.php | 1 - src/wp-admin/includes/nav-menu.php | 1 - src/wp-admin/includes/revision.php | 1 - src/wp-admin/includes/template.php | 1 - src/wp-admin/includes/theme-install.php | 1 - src/wp-admin/includes/upgrade.php | 3 --- src/wp-admin/update-core.php | 1 - .../themes/twentyeleven/inc/widgets.php | 1 - .../themes/twentynineteen/functions.php | 1 - ...class-twentytwenty-non-latin-languages.php | 1 - .../themes/twentytwenty/functions.php | 9 ------- .../themes/twentytwenty/inc/custom-css.php | 2 -- .../twentytwenty/inc/starter-content.php | 1 - .../themes/twentytwenty/inc/template-tags.php | 11 -------- .../twentytwentyone/inc/block-patterns.php | 1 - .../themes/twentytwentytwo/functions.php | 2 -- src/wp-includes/admin-bar.php | 1 - src/wp-includes/class-walker-comment.php | 1 - src/wp-includes/class-wp-http.php | 1 - .../class-wp-text-diff-renderer-table.php | 1 - src/wp-includes/comment.php | 1 - ...lass-wp-customize-header-image-control.php | 1 - ...ass-wp-customize-nav-menu-item-setting.php | 2 -- src/wp-includes/default-constants.php | 1 - src/wp-includes/functions.php | 2 -- src/wp-includes/general-template.php | 2 -- src/wp-includes/link-template.php | 1 - src/wp-includes/load.php | 1 - src/wp-includes/pomo/entry.php | 1 - src/wp-includes/post.php | 2 -- .../class-wp-rest-autosaves-controller.php | 1 - .../class-wp-rest-posts-controller.php | 2 -- .../class-wp-rest-revisions-controller.php | 1 - .../class-wp-rest-settings-controller.php | 1 - tests/phpunit/includes/abstract-testcase.php | 1 - tests/phpunit/includes/mock-fs.php | 1 - tests/phpunit/includes/mock-image-editor.php | 1 - .../testcase-rest-post-type-controller.php | 2 -- tests/phpunit/includes/wp-profiler.php | 1 - tests/phpunit/tests/actions.php | 3 --- .../tests/ajax/wpCustomizeNavMenus.php | 2 -- tests/phpunit/tests/category/getCatId.php | 1 - tests/phpunit/tests/category/getCatName.php | 1 - .../tests/category/getCategoryBySlug.php | 1 - tests/phpunit/tests/comment.php | 1 - tests/phpunit/tests/comment/checkComment.php | 1 - .../phpunit/tests/comment/getCommentLink.php | 1 - tests/phpunit/tests/comment/query.php | 4 --- tests/phpunit/tests/comment/template.php | 2 -- .../comment/wpHandleCommentSubmission.php | 26 ------------------- tests/phpunit/tests/compat/arrayKeyFirst.php | 1 - tests/phpunit/tests/compat/strContains.php | 1 - tests/phpunit/tests/compat/strEndsWith.php | 1 - tests/phpunit/tests/compat/strStartsWith.php | 1 - tests/phpunit/tests/cron.php | 3 --- tests/phpunit/tests/customize/nav-menus.php | 1 - tests/phpunit/tests/date/query.php | 2 -- tests/phpunit/tests/db/dbDelta.php | 1 - tests/phpunit/tests/dependencies.php | 2 -- tests/phpunit/tests/dependencies/styles.php | 4 --- .../tests/editor/navigation-fallback.php | 2 -- tests/phpunit/tests/feed/atom.php | 1 - tests/phpunit/tests/feed/rss2.php | 2 -- tests/phpunit/tests/filesystem/findFolder.php | 3 --- tests/phpunit/tests/filters.php | 4 --- tests/phpunit/tests/formatting/escUrl.php | 1 - .../tests/formatting/sanitizeTextField.php | 1 - .../phpunit/tests/formatting/wpTexturize.php | 1 - .../phpunit/tests/general/wpResourceHints.php | 1 - tests/phpunit/tests/http/base.php | 2 -- tests/phpunit/tests/http/http.php | 1 - tests/phpunit/tests/image/header.php | 5 ---- tests/phpunit/tests/l10n/getLocale.php | 1 - tests/phpunit/tests/link/themeFile.php | 1 - tests/phpunit/tests/media.php | 2 -- .../phpunit/tests/media/getPostGalleries.php | 2 -- tests/phpunit/tests/menu/wp-nav-menu.php | 1 - tests/phpunit/tests/meta/registerMeta.php | 1 - tests/phpunit/tests/multisite/site.php | 2 -- tests/phpunit/tests/pluggable/signatures.php | 3 --- tests/phpunit/tests/pomo/mo.php | 1 - tests/phpunit/tests/post/filtering.php | 1 - tests/phpunit/tests/post/getPages.php | 1 - tests/phpunit/tests/post/meta.php | 4 --- tests/phpunit/tests/post/nav-menu.php | 3 --- tests/phpunit/tests/post/wpInsertPost.php | 2 -- tests/phpunit/tests/query/commentCount.php | 1 - tests/phpunit/tests/query/conditionals.php | 3 --- tests/phpunit/tests/query/metaQuery.php | 1 - tests/phpunit/tests/query/results.php | 1 - .../rest-api/rest-attachments-controller.php | 1 - .../rest-api/rest-autosaves-controller.php | 1 - .../rest-api/rest-block-type-controller.php | 4 --- .../tests/rest-api/rest-controller.php | 1 - .../rest-navigation-fallback-controller.php | 1 - .../rest-pattern-directory-controller.php | 1 - .../tests/rest-api/rest-posts-controller.php | 2 -- .../rest-api/rest-sidebars-controller.php | 1 - .../tests/rest-api/rest-users-controller.php | 2 -- .../rest-api/wpRestUrlDetailsController.php | 2 -- tests/phpunit/tests/shortcode.php | 1 - tests/phpunit/tests/taxonomy.php | 1 - tests/phpunit/tests/term/getTerms.php | 3 --- tests/phpunit/tests/term/wpInsertTerm.php | 2 -- tests/phpunit/tests/term/wpSetObjectTerms.php | 2 -- tests/phpunit/tests/term/wpTaxonomy.php | 1 - tests/phpunit/tests/theme/themeDir.php | 2 -- tests/phpunit/tests/theme/wpThemeJson.php | 3 --- .../tests/theme/wpThemeJsonResolver.php | 1 - tests/phpunit/tests/user.php | 2 -- tests/phpunit/tests/user/capabilities.php | 16 ------------ tests/phpunit/tests/user/countUsers.php | 3 --- tests/phpunit/tests/user/getUserCount.php | 1 - tests/phpunit/tests/user/mapMetaCap.php | 1 - tests/phpunit/tests/user/query.php | 1 - .../tests/user/wpGetUsersWithNoRole.php | 1 - tests/phpunit/tests/utils.php | 1 - tests/phpunit/tests/walker.php | 14 ---------- tests/phpunit/tests/widgets.php | 5 ---- tests/phpunit/tests/xmlrpc/basic.php | 1 - 123 files changed, 263 deletions(-) diff --git a/src/wp-admin/includes/class-wp-filesystem-base.php b/src/wp-admin/includes/class-wp-filesystem-base.php index d1a10f957f..b20a4b99e4 100644 --- a/src/wp-admin/includes/class-wp-filesystem-base.php +++ b/src/wp-admin/includes/class-wp-filesystem-base.php @@ -333,7 +333,6 @@ class WP_Filesystem_Base { * This comes into effect when the CWD is /home/user/ but WP is at /var/www/.... */ return $this->search_for_folder( $folder, '/', true ); - } /** diff --git a/src/wp-admin/includes/class-wp-terms-list-table.php b/src/wp-admin/includes/class-wp-terms-list-table.php index 3c277d6a61..9f2febedc2 100644 --- a/src/wp-admin/includes/class-wp-terms-list-table.php +++ b/src/wp-admin/includes/class-wp-terms-list-table.php @@ -63,7 +63,6 @@ class WP_Terms_List_Table extends WP_List_Table { if ( empty( $post_type ) || ! in_array( $post_type, get_post_types( array( 'show_ui' => true ) ), true ) ) { $post_type = 'post'; } - } /** diff --git a/src/wp-admin/includes/dashboard.php b/src/wp-admin/includes/dashboard.php index f0d0da1779..a92b684818 100644 --- a/src/wp-admin/includes/dashboard.php +++ b/src/wp-admin/includes/dashboard.php @@ -284,7 +284,6 @@ function wp_dashboard() { '; return $i; - } /** diff --git a/src/wp-admin/includes/theme-install.php b/src/wp-admin/includes/theme-install.php index 94b591eedf..949f0d54a1 100644 --- a/src/wp-admin/includes/theme-install.php +++ b/src/wp-admin/includes/theme-install.php @@ -243,7 +243,6 @@ function display_themes() { } $wp_list_table->prepare_items(); $wp_list_table->display(); - } /** diff --git a/src/wp-admin/includes/upgrade.php b/src/wp-admin/includes/upgrade.php index 39455ad425..0f08122239 100644 --- a/src/wp-admin/includes/upgrade.php +++ b/src/wp-admin/includes/upgrade.php @@ -995,7 +995,6 @@ function upgrade_110() { $wpdb->query( "UPDATE $wpdb->comments SET comment_date_gmt = DATE_ADD(comment_date, INTERVAL '$add_hours:$add_minutes' HOUR_MINUTE)" ); $wpdb->query( "UPDATE $wpdb->users SET user_registered = DATE_ADD(user_registered, INTERVAL '$add_hours:$add_minutes' HOUR_MINUTE)" ); } - } /** @@ -1545,7 +1544,6 @@ function upgrade_250() { if ( $wp_current_db_version < 6689 ) { populate_roles_250(); } - } /** @@ -1704,7 +1702,6 @@ function upgrade_300() { ) ); } - } /** diff --git a/src/wp-admin/update-core.php b/src/wp-admin/update-core.php index f1a8530a22..be9708efbf 100644 --- a/src/wp-admin/update-core.php +++ b/src/wp-admin/update-core.php @@ -191,7 +191,6 @@ function list_core_update( $update ) { } echo ''; - } /** diff --git a/src/wp-content/themes/twentyeleven/inc/widgets.php b/src/wp-content/themes/twentyeleven/inc/widgets.php index b84b808a3c..5ba4f1a438 100644 --- a/src/wp-content/themes/twentyeleven/inc/widgets.php +++ b/src/wp-content/themes/twentyeleven/inc/widgets.php @@ -147,7 +147,6 @@ class Twenty_Eleven_Ephemera_Widget extends WP_Widget { if ( ! is_customize_preview() ) { wp_cache_set( 'widget_twentyeleven_ephemera', $cache, 'widget' ); } - } /** diff --git a/src/wp-content/themes/twentynineteen/functions.php b/src/wp-content/themes/twentynineteen/functions.php index 0689b7e332..f53b3a2053 100644 --- a/src/wp-content/themes/twentynineteen/functions.php +++ b/src/wp-content/themes/twentynineteen/functions.php @@ -207,7 +207,6 @@ function twentynineteen_widgets_init() { 'after_title' => '', ) ); - } add_action( 'widgets_init', 'twentynineteen_widgets_init' ); diff --git a/src/wp-content/themes/twentytwenty/classes/class-twentytwenty-non-latin-languages.php b/src/wp-content/themes/twentytwenty/classes/class-twentytwenty-non-latin-languages.php index 9be7acafe6..a5bbe31f53 100644 --- a/src/wp-content/themes/twentytwenty/classes/class-twentytwenty-non-latin-languages.php +++ b/src/wp-content/themes/twentytwenty/classes/class-twentytwenty-non-latin-languages.php @@ -131,7 +131,6 @@ if ( ! class_exists( 'TwentyTwenty_Non_Latin_Languages' ) ) { // Return the specified styles. return twentytwenty_generate_css( implode( ',', $elements[ $type ] ), 'font-family', implode( ',', $font_family[ $locale ] ), null, null, false ); - } } } diff --git a/src/wp-content/themes/twentytwenty/functions.php b/src/wp-content/themes/twentytwenty/functions.php index dbf0fc94a6..fc2b0dddbf 100644 --- a/src/wp-content/themes/twentytwenty/functions.php +++ b/src/wp-content/themes/twentytwenty/functions.php @@ -136,7 +136,6 @@ function twentytwenty_theme_support() { */ $loader = new TwentyTwenty_Script_Loader(); add_filter( 'script_loader_tag', array( $loader, 'filter_script_loader_tag' ), 10, 2 ); - } add_action( 'after_setup_theme', 'twentytwenty_theme_support' ); @@ -195,7 +194,6 @@ function twentytwenty_register_styles() { // Add print CSS. wp_enqueue_style( 'twentytwenty-print-style', get_template_directory_uri() . '/print.css', null, $theme_version, 'print' ); - } add_action( 'wp_enqueue_scripts', 'twentytwenty_register_styles' ); @@ -215,7 +213,6 @@ function twentytwenty_register_scripts() { wp_enqueue_script( 'twentytwenty-js', get_template_directory_uri() . '/assets/js/index.js', array(), $theme_version ); wp_script_add_data( 'twentytwenty-js', 'async', true ); - } add_action( 'wp_enqueue_scripts', 'twentytwenty_register_scripts' ); @@ -330,7 +327,6 @@ function twentytwenty_get_custom_logo( $html ) { } return $html; - } add_filter( 'get_custom_logo', 'twentytwenty_get_custom_logo' ); @@ -402,7 +398,6 @@ function twentytwenty_sidebar_registration() { ) ) ); - } add_action( 'widgets_init', 'twentytwenty_sidebar_registration' ); @@ -448,7 +443,6 @@ function twentytwenty_classic_editor_styles() { ); add_editor_style( $classic_editor_styles ); - } add_action( 'init', 'twentytwenty_classic_editor_styles' ); @@ -477,7 +471,6 @@ function twentytwenty_add_classic_editor_customizer_styles( $mce_init ) { } return $mce_init; - } add_filter( 'tiny_mce_before_init', 'twentytwenty_add_classic_editor_customizer_styles' ); @@ -505,7 +498,6 @@ function twentytwenty_add_classic_editor_non_latin_styles( $mce_init ) { } return $mce_init; - } add_filter( 'tiny_mce_before_init', 'twentytwenty_add_classic_editor_non_latin_styles' ); @@ -597,7 +589,6 @@ function twentytwenty_block_editor_settings() { if ( '#ffffff' === strtolower( twentytwenty_get_color_for_area( 'content', 'text' ) ) ) { add_theme_support( 'dark-editor-style' ); } - } add_action( 'after_setup_theme', 'twentytwenty_block_editor_settings' ); diff --git a/src/wp-content/themes/twentytwenty/inc/custom-css.php b/src/wp-content/themes/twentytwenty/inc/custom-css.php index 815f5d1b72..e551eb6abc 100644 --- a/src/wp-content/themes/twentytwenty/inc/custom-css.php +++ b/src/wp-content/themes/twentytwenty/inc/custom-css.php @@ -42,7 +42,6 @@ if ( ! function_exists( 'twentytwenty_generate_css' ) ) { } return $return; - } } @@ -190,6 +189,5 @@ if ( ! function_exists( 'twentytwenty_get_customizer_css' ) ) { // Return the results. return ob_get_clean(); - } } diff --git a/src/wp-content/themes/twentytwenty/inc/starter-content.php b/src/wp-content/themes/twentytwenty/inc/starter-content.php index 89be38bbe8..52b36d4c9f 100644 --- a/src/wp-content/themes/twentytwenty/inc/starter-content.php +++ b/src/wp-content/themes/twentytwenty/inc/starter-content.php @@ -214,5 +214,4 @@ function twentytwenty_get_starter_content() { * @param array $starter_content Array of starter content. */ return apply_filters( 'twentytwenty_starter_content', $starter_content ); - } diff --git a/src/wp-content/themes/twentytwenty/inc/template-tags.php b/src/wp-content/themes/twentytwenty/inc/template-tags.php index d91ffd344a..8014eb4123 100644 --- a/src/wp-content/themes/twentytwenty/inc/template-tags.php +++ b/src/wp-content/themes/twentytwenty/inc/template-tags.php @@ -88,7 +88,6 @@ function twentytwenty_site_logo( $args = array(), $display = true ) { } echo $html; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped - } /** @@ -154,7 +153,6 @@ function twentytwenty_is_comment_by_post_author( $comment = null ) { } } return false; - } /** @@ -172,7 +170,6 @@ function twentytwenty_filter_comment_reply_link( $link ) { $link = str_replace( 'class=\'', 'class=\'do-not-scroll ', $link ); return $link; - } add_filter( 'comment_reply_link', 'twentytwenty_filter_comment_reply_link' ); @@ -194,7 +191,6 @@ add_filter( 'comment_reply_link', 'twentytwenty_filter_comment_reply_link' ); function twentytwenty_the_post_meta( $post_id = null, $location = 'single-top' ) { echo twentytwenty_get_post_meta( $post_id, $location ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Escaped in twentytwenty_get_post_meta(). - } /** @@ -231,7 +227,6 @@ function twentytwenty_edit_post_link( $link, $post_id, $text ) { ); return '
'; - } add_filter( 'edit_post_link', 'twentytwenty_edit_post_link', 10, 3 ); @@ -523,7 +518,6 @@ function twentytwenty_get_post_meta( $post_id = null, $location = 'single-top' ) } } - } /** @@ -564,7 +558,6 @@ function twentytwenty_filter_wp_list_pages_item_classes( $css_class, $page, $dep } return $css_class; - } add_filter( 'page_css_class', 'twentytwenty_filter_wp_list_pages_item_classes', 10, 4 ); @@ -614,7 +607,6 @@ function twentytwenty_add_sub_toggles_to_main_menu( $args, $item ) { } return $args; - } add_filter( 'nav_menu_item_args', 'twentytwenty_add_sub_toggles_to_main_menu', 10, 2 ); @@ -661,7 +653,6 @@ function twentytwenty_no_js_class() { ?> '

' . esc_html_x( 'example@example.com', 'Block pattern sample content', 'twentytwentyone' ) . '
' . esc_html_x( '123-456-7890', 'Block pattern sample content', 'twentytwentyone' ) . '

' . esc_html_x( '123 Main Street', 'Block pattern sample content', 'twentytwentyone' ) . '
' . esc_html_x( 'Cambridge, MA, 02139', 'Block pattern sample content', 'twentytwentyone' ) . '

', ) ); - } add_action( 'init', 'twenty_twenty_one_register_block_pattern' ); } diff --git a/src/wp-content/themes/twentytwentytwo/functions.php b/src/wp-content/themes/twentytwentytwo/functions.php index 3b1dde74c4..cd994beec7 100644 --- a/src/wp-content/themes/twentytwentytwo/functions.php +++ b/src/wp-content/themes/twentytwentytwo/functions.php @@ -26,7 +26,6 @@ if ( ! function_exists( 'twentytwentytwo_support' ) ) : // Enqueue editor styles. add_editor_style( 'style.css' ); - } endif; @@ -56,7 +55,6 @@ if ( ! function_exists( 'twentytwentytwo_styles' ) ) : // Enqueue theme stylesheet. wp_enqueue_style( 'twentytwentytwo-style' ); - } endif; diff --git a/src/wp-includes/admin-bar.php b/src/wp-includes/admin-bar.php index d1d438d9e5..ca35a56ae8 100644 --- a/src/wp-includes/admin-bar.php +++ b/src/wp-includes/admin-bar.php @@ -1100,7 +1100,6 @@ function wp_admin_bar_appearance_menu( $wp_admin_bar ) { ) ); } - } /** diff --git a/src/wp-includes/class-walker-comment.php b/src/wp-includes/class-walker-comment.php index dfc8ccd39d..2aabcbd158 100644 --- a/src/wp-includes/class-walker-comment.php +++ b/src/wp-includes/class-walker-comment.php @@ -150,7 +150,6 @@ class Walker_Comment extends Walker { unset( $children_elements[ $id ] ); } - } /** diff --git a/src/wp-includes/class-wp-http.php b/src/wp-includes/class-wp-http.php index bc411179d3..87a9342a92 100644 --- a/src/wp-includes/class-wp-http.php +++ b/src/wp-includes/class-wp-http.php @@ -919,7 +919,6 @@ class WP_Http { } else { return ! in_array( $check['host'], $accessible_hosts, true ); // Inverse logic, if it's in the array, then don't block it. } - } /** diff --git a/src/wp-includes/class-wp-text-diff-renderer-table.php b/src/wp-includes/class-wp-text-diff-renderer-table.php index c0cf35b653..ddf732c3e5 100644 --- a/src/wp-includes/class-wp-text-diff-renderer-table.php +++ b/src/wp-includes/class-wp-text-diff-renderer-table.php @@ -118,7 +118,6 @@ class WP_Text_Diff_Renderer_Table extends Text_Diff_Renderer { /* translators: Hidden accessibility text. */ __( 'Added:' ) . " {$line}"; - } /** diff --git a/src/wp-includes/comment.php b/src/wp-includes/comment.php index b538b2c5c1..ce0ebe769d 100644 --- a/src/wp-includes/comment.php +++ b/src/wp-includes/comment.php @@ -2700,7 +2700,6 @@ function wp_update_comment_count( $post_id, $do_deferred = false ) { } elseif ( $post_id ) { return wp_update_comment_count_now( $post_id ); } - } /** diff --git a/src/wp-includes/customize/class-wp-customize-header-image-control.php b/src/wp-includes/customize/class-wp-customize-header-image-control.php index 0c8cc0e21e..ecb134a5d1 100644 --- a/src/wp-includes/customize/class-wp-customize-header-image-control.php +++ b/src/wp-includes/customize/class-wp-customize-header-image-control.php @@ -62,7 +62,6 @@ class WP_Customize_Header_Image_Control extends WP_Customize_Image_Control { 'get_url' => 'get_header_image', ) ); - } /** diff --git a/src/wp-includes/customize/class-wp-customize-nav-menu-item-setting.php b/src/wp-includes/customize/class-wp-customize-nav-menu-item-setting.php index 028cd8da20..4c8ad5bec0 100644 --- a/src/wp-includes/customize/class-wp-customize-nav-menu-item-setting.php +++ b/src/wp-includes/customize/class-wp-customize-nav-menu-item-setting.php @@ -183,7 +183,6 @@ class WP_Customize_Nav_Menu_Item_Setting extends WP_Customize_Setting { throw new Exception( "Supplied nav_menu_item value missing property: $missing" ); } } - } /** @@ -878,7 +877,6 @@ class WP_Customize_Nav_Menu_Item_Setting extends WP_Customize_Setting { } } } - } /** diff --git a/src/wp-includes/default-constants.php b/src/wp-includes/default-constants.php index a1f4eedd54..6e64e789a0 100644 --- a/src/wp-includes/default-constants.php +++ b/src/wp-includes/default-constants.php @@ -429,5 +429,4 @@ function wp_templating_constants() { if ( ! defined( 'WP_DEFAULT_THEME' ) ) { define( 'WP_DEFAULT_THEME', 'twentytwentythree' ); } - } diff --git a/src/wp-includes/functions.php b/src/wp-includes/functions.php index 835fa7190e..4a2a2b1779 100644 --- a/src/wp-includes/functions.php +++ b/src/wp-includes/functions.php @@ -4829,7 +4829,6 @@ function smilies_init() { } $wp_smiliessearch .= ')(?=' . $spaces . '|$)/m'; - } /** @@ -5609,7 +5608,6 @@ function _deprecated_constructor( $class_name, $version, $parent_class = '' ) { } } } - } /** diff --git a/src/wp-includes/general-template.php b/src/wp-includes/general-template.php index a2b1029064..fafbfcbcd9 100644 --- a/src/wp-includes/general-template.php +++ b/src/wp-includes/general-template.php @@ -2622,7 +2622,6 @@ function the_modified_date( $format = '', $before = '', $after = '', $display = } else { return $the_modified_date; } - } /** @@ -4810,7 +4809,6 @@ function register_admin_color_schemes() { 'current' => '#fff', ) ); - } /** diff --git a/src/wp-includes/link-template.php b/src/wp-includes/link-template.php index bdf0d1a00d..a34b34b6ce 100644 --- a/src/wp-includes/link-template.php +++ b/src/wp-includes/link-template.php @@ -2718,7 +2718,6 @@ function get_posts_nav_link( $args = array() ) { } } return $return; - } /** diff --git a/src/wp-includes/load.php b/src/wp-includes/load.php index 3db556583c..8f18a3a6e9 100644 --- a/src/wp-includes/load.php +++ b/src/wp-includes/load.php @@ -1865,7 +1865,6 @@ function wp_is_jsonp_request() { $jsonp_enabled = apply_filters( 'rest_jsonp_enabled', true ); return $jsonp_enabled; - } /** diff --git a/src/wp-includes/pomo/entry.php b/src/wp-includes/pomo/entry.php index cd209e2f20..9ca63f89de 100644 --- a/src/wp-includes/pomo/entry.php +++ b/src/wp-includes/pomo/entry.php @@ -111,7 +111,6 @@ if ( ! class_exists( 'Translation_Entry', false ) ) : if ( $this->extracted_comments !== $other->extracted_comments ) { $this->extracted_comments .= $other->extracted_comments; } - } } endif; diff --git a/src/wp-includes/post.php b/src/wp-includes/post.php index 93d6ce9ade..5d7aee24ee 100644 --- a/src/wp-includes/post.php +++ b/src/wp-includes/post.php @@ -2439,7 +2439,6 @@ function get_posts( $args = null ) { $get_posts = new WP_Query(); return $get_posts->query( $parsed_args ); - } // @@ -3998,7 +3997,6 @@ function wp_get_recent_posts( $args = array(), $output = ARRAY_A ) { } return $results ? $results : false; - } /** diff --git a/src/wp-includes/rest-api/endpoints/class-wp-rest-autosaves-controller.php b/src/wp-includes/rest-api/endpoints/class-wp-rest-autosaves-controller.php index 3ebed0752b..689e86355c 100644 --- a/src/wp-includes/rest-api/endpoints/class-wp-rest-autosaves-controller.php +++ b/src/wp-includes/rest-api/endpoints/class-wp-rest-autosaves-controller.php @@ -131,7 +131,6 @@ class WP_REST_Autosaves_Controller extends WP_REST_Revisions_Controller { 'schema' => array( $this, 'get_public_item_schema' ), ) ); - } /** diff --git a/src/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php b/src/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php index 356c321129..69c8ae946a 100644 --- a/src/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php +++ b/src/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php @@ -1397,7 +1397,6 @@ class WP_REST_Posts_Controller extends WP_REST_Controller { * @param WP_REST_Request $request Request object. */ return apply_filters( "rest_pre_insert_{$this->post_type}", $prepared_post, $request ); - } /** @@ -1496,7 +1495,6 @@ class WP_REST_Posts_Controller extends WP_REST_Controller { } else { return delete_post_thumbnail( $post_id ); } - } /** diff --git a/src/wp-includes/rest-api/endpoints/class-wp-rest-revisions-controller.php b/src/wp-includes/rest-api/endpoints/class-wp-rest-revisions-controller.php index 6fde5f13f5..66122a1922 100644 --- a/src/wp-includes/rest-api/endpoints/class-wp-rest-revisions-controller.php +++ b/src/wp-includes/rest-api/endpoints/class-wp-rest-revisions-controller.php @@ -128,7 +128,6 @@ class WP_REST_Revisions_Controller extends WP_REST_Controller { 'schema' => array( $this, 'get_public_item_schema' ), ) ); - } /** diff --git a/src/wp-includes/rest-api/endpoints/class-wp-rest-settings-controller.php b/src/wp-includes/rest-api/endpoints/class-wp-rest-settings-controller.php index 1c83f5caea..365afd39d2 100644 --- a/src/wp-includes/rest-api/endpoints/class-wp-rest-settings-controller.php +++ b/src/wp-includes/rest-api/endpoints/class-wp-rest-settings-controller.php @@ -54,7 +54,6 @@ class WP_REST_Settings_Controller extends WP_REST_Controller { 'schema' => array( $this, 'get_public_item_schema' ), ) ); - } /** diff --git a/tests/phpunit/includes/abstract-testcase.php b/tests/phpunit/includes/abstract-testcase.php index 129943f274..3f5519ae41 100644 --- a/tests/phpunit/includes/abstract-testcase.php +++ b/tests/phpunit/includes/abstract-testcase.php @@ -274,7 +274,6 @@ abstract class WP_UnitTestCase_Base extends PHPUnit_Adapter_TestCase { if ( 0 === strpos( $response->get_error_message(), 'stream_socket_client(): unable to connect to tcp://s.w.org:80' ) ) { $this->markTestSkipped( 'HTTP timeout' ); } - } /** diff --git a/tests/phpunit/includes/mock-fs.php b/tests/phpunit/includes/mock-fs.php index 675d66b842..40705dc411 100644 --- a/tests/phpunit/includes/mock-fs.php +++ b/tests/phpunit/includes/mock-fs.php @@ -73,7 +73,6 @@ class WP_Filesystem_MockFS extends WP_Filesystem_Base { $this->put_contents( $path, 'This is a test file' ); } } - } /** diff --git a/tests/phpunit/includes/mock-image-editor.php b/tests/phpunit/includes/mock-image-editor.php index bc08fbb290..ab2e7379fd 100644 --- a/tests/phpunit/includes/mock-image-editor.php +++ b/tests/phpunit/includes/mock-image-editor.php @@ -61,7 +61,6 @@ if ( class_exists( 'WP_Image_Editor' ) ) : return self::$save_return; } public function stream( $mime_type = null ) { - } public function get_size() { diff --git a/tests/phpunit/includes/testcase-rest-post-type-controller.php b/tests/phpunit/includes/testcase-rest-post-type-controller.php index 1ebb28f3a5..0fc03ef5ec 100644 --- a/tests/phpunit/includes/testcase-rest-post-type-controller.php +++ b/tests/phpunit/includes/testcase-rest-post-type-controller.php @@ -196,7 +196,6 @@ abstract class WP_Test_REST_Post_Type_Controller_Testcase extends WP_Test_REST_C $num++; } } - } protected function check_get_posts_response( $response, $context = 'view' ) { @@ -240,7 +239,6 @@ abstract class WP_Test_REST_Post_Type_Controller_Testcase extends WP_Test_REST_C $data = $response->get_data(); $post = get_post( $data['id'] ); $this->check_post_data( $post, $data, $context, $response->get_links() ); - } protected function check_create_post_response( $response ) { diff --git a/tests/phpunit/includes/wp-profiler.php b/tests/phpunit/includes/wp-profiler.php index e589e783c6..293f85645d 100644 --- a/tests/phpunit/includes/wp-profiler.php +++ b/tests/phpunit/includes/wp-profiler.php @@ -56,7 +56,6 @@ class WPProfiler { 'filters' => array(), 'queries' => array(), ); - } public function stop() { diff --git a/tests/phpunit/tests/actions.php b/tests/phpunit/tests/actions.php index 2f0daaa6a0..ae02973c5e 100644 --- a/tests/phpunit/tests/actions.php +++ b/tests/phpunit/tests/actions.php @@ -75,7 +75,6 @@ class Tests_Actions extends WP_UnitTestCase { do_action( $hook_name ); $this->assertSame( 1, $a->get_call_count() ); $this->assertSame( array( $hook_name ), $a->get_hook_names() ); - } /** @@ -282,7 +281,6 @@ class Tests_Actions extends WP_UnitTestCase { // $hook_name1's count hasn't changed, $hook_name2 should be correct. $this->assertSame( 1, did_action( $hook_name1 ) ); $this->assertSame( $count, did_action( $hook_name2 ) ); - } /** @@ -309,7 +307,6 @@ class Tests_Actions extends WP_UnitTestCase { remove_action( 'all', array( &$a, 'action' ) ); $this->assertFalse( has_filter( 'all', array( &$a, 'action' ) ) ); - } /** diff --git a/tests/phpunit/tests/ajax/wpCustomizeNavMenus.php b/tests/phpunit/tests/ajax/wpCustomizeNavMenus.php index db34c1c5d0..40f2dd1f6f 100644 --- a/tests/phpunit/tests/ajax/wpCustomizeNavMenus.php +++ b/tests/phpunit/tests/ajax/wpCustomizeNavMenus.php @@ -107,7 +107,6 @@ class Tests_Ajax_wpCustomizeNavMenus extends WP_Ajax_UnitTestCase { $this->assertSame( $expected_results, $response ); } - } /** @@ -291,7 +290,6 @@ class Tests_Ajax_wpCustomizeNavMenus extends WP_Ajax_UnitTestCase { // Get the results. $response = json_decode( $this->_last_response, true ); $this->assertSame( $success_status, $response['success'] ); - } /** diff --git a/tests/phpunit/tests/category/getCatId.php b/tests/phpunit/tests/category/getCatId.php index b5118d8233..33709a68d3 100644 --- a/tests/phpunit/tests/category/getCatId.php +++ b/tests/phpunit/tests/category/getCatId.php @@ -24,6 +24,5 @@ class Tests_Category_GetCatId extends WP_UnitTestCase { $this->assertSame( $testcat->term_id, get_cat_ID( $testcat->name ) ); $this->assertSame( 0, get_cat_ID( 'NO CAT' ) ); $this->assertSame( 0, get_cat_ID( 12 ) ); - } } diff --git a/tests/phpunit/tests/category/getCatName.php b/tests/phpunit/tests/category/getCatName.php index bc333a2b46..1a0364abbc 100644 --- a/tests/phpunit/tests/category/getCatName.php +++ b/tests/phpunit/tests/category/getCatName.php @@ -24,6 +24,5 @@ class Tests_Category_GetCatName extends WP_UnitTestCase { $this->assertSame( $testcat->name, get_cat_name( $testcat->term_id ) ); $this->assertSame( '', get_cat_name( -1 ) ); $this->assertSame( '', get_cat_name( $testcat->term_id + 100 ) ); - } } diff --git a/tests/phpunit/tests/category/getCategoryBySlug.php b/tests/phpunit/tests/category/getCategoryBySlug.php index f7c0a3b886..58ff5bfb27 100644 --- a/tests/phpunit/tests/category/getCategoryBySlug.php +++ b/tests/phpunit/tests/category/getCategoryBySlug.php @@ -34,6 +34,5 @@ class Tests_Category_GetCategoryBySlug extends WP_UnitTestCase { // Validate unknown category returns false. $this->assertFalse( get_category_by_slug( 'testcat3' ) ); - } } diff --git a/tests/phpunit/tests/comment.php b/tests/phpunit/tests/comment.php index 5be490107f..d37007d824 100644 --- a/tests/phpunit/tests/comment.php +++ b/tests/phpunit/tests/comment.php @@ -1012,7 +1012,6 @@ class Tests_Comment extends WP_UnitTestCase { ), $this->preprocess_comment_data ); - } public function filter_preprocess_comment( $commentdata ) { diff --git a/tests/phpunit/tests/comment/checkComment.php b/tests/phpunit/tests/comment/checkComment.php index c23e1d4dc2..bf73a9e1be 100644 --- a/tests/phpunit/tests/comment/checkComment.php +++ b/tests/phpunit/tests/comment/checkComment.php @@ -32,7 +32,6 @@ class Tests_Comment_CheckComment extends WP_UnitTestCase { update_option( 'comment_previously_approved', 1 ); $results = check_comment( $author, $author_email, $author_url, $comment, $author_ip, $user_agent, $comment_type ); $this->assertFalse( $results ); - } public function test_should_return_true_when_comment_previously_approved_is_enabled_and_author_has_approved_comment() { diff --git a/tests/phpunit/tests/comment/getCommentLink.php b/tests/phpunit/tests/comment/getCommentLink.php index 3f2f2ff504..8dc0964e0b 100644 --- a/tests/phpunit/tests/comment/getCommentLink.php +++ b/tests/phpunit/tests/comment/getCommentLink.php @@ -55,7 +55,6 @@ class Tests_Comment_GetCommentLink extends WP_UnitTestCase { 'comment_date_gmt' => gmdate( 'Y-m-d H:i:s', $now - 600 ), ) ); - } /** diff --git a/tests/phpunit/tests/comment/query.php b/tests/phpunit/tests/comment/query.php index 9f6bb14e54..65f9af6253 100644 --- a/tests/phpunit/tests/comment/query.php +++ b/tests/phpunit/tests/comment/query.php @@ -245,7 +245,6 @@ class Tests_Comment_Query extends WP_UnitTestCase { ); $this->assertSameSets( array( $c2, $c3 ), $found ); - } /** @@ -289,7 +288,6 @@ class Tests_Comment_Query extends WP_UnitTestCase { ); $this->assertSameSets( array( $c2, $c3 ), $found ); - } /** @@ -1748,7 +1746,6 @@ class Tests_Comment_Query extends WP_UnitTestCase { $this->assertEquals( $users[0], $comments[0]->user_id ); $this->assertEquals( $users[0], $comments[1]->user_id ); $this->assertEquals( $users[1], $comments[2]->user_id ); - } /** @@ -3931,7 +3928,6 @@ class Tests_Comment_Query extends WP_UnitTestCase { ); $this->assertSame( array( $c2, $c3 ), $ids->comments ); - } /** diff --git a/tests/phpunit/tests/comment/template.php b/tests/phpunit/tests/comment/template.php index 4e9f82c581..648e803132 100644 --- a/tests/phpunit/tests/comment/template.php +++ b/tests/phpunit/tests/comment/template.php @@ -69,7 +69,6 @@ class Tests_Comment_Template extends WP_UnitTestCase { $comments_number_text = ob_get_clean(); $this->assertSame( sprintf( _n( '%s Comment', '%s Comments', 6 ), '6' ), $comments_number_text ); - } /** @@ -93,7 +92,6 @@ class Tests_Comment_Template extends WP_UnitTestCase { $this->go_to( $permalink ); $this->assertSame( sprintf( _n( '%s Comment', '%s Comments', 2 ), '2' ), get_comments_number_text() ); - } /** diff --git a/tests/phpunit/tests/comment/wpHandleCommentSubmission.php b/tests/phpunit/tests/comment/wpHandleCommentSubmission.php index ff2f3c8b7a..f97712b1b6 100644 --- a/tests/phpunit/tests/comment/wpHandleCommentSubmission.php +++ b/tests/phpunit/tests/comment/wpHandleCommentSubmission.php @@ -54,7 +54,6 @@ class Tests_Comment_wpHandleCommentSubmission extends WP_UnitTestCase { $this->assertSame( 1, did_action( $error ) ); $this->assertWPError( $comment ); $this->assertSame( $error, $comment->get_error_code() ); - } public function test_submitting_comment_to_post_with_closed_comments_returns_error() { @@ -77,7 +76,6 @@ class Tests_Comment_wpHandleCommentSubmission extends WP_UnitTestCase { $this->assertSame( 1, did_action( $error ) ); $this->assertWPError( $comment ); $this->assertSame( $error, $comment->get_error_code() ); - } public function test_submitting_comment_to_trashed_post_returns_error() { @@ -98,7 +96,6 @@ class Tests_Comment_wpHandleCommentSubmission extends WP_UnitTestCase { $this->assertSame( 1, did_action( $error ) ); $this->assertWPError( $comment ); $this->assertSame( $error, $comment->get_error_code() ); - } public function test_submitting_comment_to_draft_post_returns_error() { @@ -121,7 +118,6 @@ class Tests_Comment_wpHandleCommentSubmission extends WP_UnitTestCase { $this->assertWPError( $comment ); $this->assertSame( $error, $comment->get_error_code() ); $this->assertEmpty( $comment->get_error_message() ); - } /** @@ -175,7 +171,6 @@ class Tests_Comment_wpHandleCommentSubmission extends WP_UnitTestCase { $this->assertSame( 1, did_action( $error ) ); $this->assertWPError( $comment ); $this->assertSame( $error, $comment->get_error_code() ); - } public function test_submitting_comment_to_password_required_post_returns_error() { @@ -198,7 +193,6 @@ class Tests_Comment_wpHandleCommentSubmission extends WP_UnitTestCase { $this->assertSame( 1, did_action( $error ) ); $this->assertWPError( $comment ); $this->assertSame( $error, $comment->get_error_code() ); - } public function test_submitting_comment_to_password_protected_post_succeeds() { @@ -225,7 +219,6 @@ class Tests_Comment_wpHandleCommentSubmission extends WP_UnitTestCase { $this->assertNotWPError( $comment ); $this->assertInstanceOf( 'WP_Comment', $comment ); - } public function test_submitting_valid_comment_as_logged_in_user_succeeds() { @@ -252,7 +245,6 @@ class Tests_Comment_wpHandleCommentSubmission extends WP_UnitTestCase { $this->assertSame( $user->user_email, $comment->comment_author_email ); $this->assertSame( $user->user_url, $comment->comment_author_url ); $this->assertSame( $user->ID, (int) $comment->user_id ); - } public function test_submitting_valid_comment_anonymously_succeeds() { @@ -274,7 +266,6 @@ class Tests_Comment_wpHandleCommentSubmission extends WP_UnitTestCase { $this->assertSame( 'comment@example.org', $comment->comment_author_email ); $this->assertSame( 'http://user.example.org', $comment->comment_author_url ); $this->assertSame( '0', $comment->user_id ); - } /** @@ -297,7 +288,6 @@ class Tests_Comment_wpHandleCommentSubmission extends WP_UnitTestCase { $this->assertSame( 'Comment with 1 slash: \\', $comment->comment_content ); $this->assertSame( 'Comment Author with 1 slash: \\', $comment->comment_author ); $this->assertSame( 'comment@example.org', $comment->comment_author_email ); - } public function test_submitting_comment_anonymously_to_private_post_returns_error() { @@ -318,7 +308,6 @@ class Tests_Comment_wpHandleCommentSubmission extends WP_UnitTestCase { $this->assertFalse( is_user_logged_in() ); $this->assertWPError( $comment ); $this->assertSame( $error, $comment->get_error_code() ); - } public function test_submitting_comment_as_logged_in_user_to_inaccessible_private_post_returns_error() { @@ -348,7 +337,6 @@ class Tests_Comment_wpHandleCommentSubmission extends WP_UnitTestCase { $this->assertFalse( current_user_can( 'read_post', $post->ID ) ); $this->assertWPError( $comment ); $this->assertSame( $error, $comment->get_error_code() ); - } public function test_submitting_comment_to_private_post_with_closed_comments_returns_correct_error() { @@ -379,7 +367,6 @@ class Tests_Comment_wpHandleCommentSubmission extends WP_UnitTestCase { $this->assertFalse( current_user_can( 'read_post', $post->ID ) ); $this->assertWPError( $comment ); $this->assertSame( $error, $comment->get_error_code() ); - } public function test_submitting_comment_to_own_private_post_succeeds() { @@ -402,7 +389,6 @@ class Tests_Comment_wpHandleCommentSubmission extends WP_UnitTestCase { $this->assertTrue( current_user_can( 'read_post', $post->ID ) ); $this->assertNotWPError( $comment ); $this->assertInstanceOf( 'WP_Comment', $comment ); - } public function test_submitting_comment_to_accessible_private_post_succeeds() { @@ -425,7 +411,6 @@ class Tests_Comment_wpHandleCommentSubmission extends WP_UnitTestCase { $this->assertTrue( current_user_can( 'read_post', $post->ID ) ); $this->assertNotWPError( $comment ); $this->assertInstanceOf( 'WP_Comment', $comment ); - } public function test_anonymous_user_cannot_comment_unfiltered_html() { @@ -440,7 +425,6 @@ class Tests_Comment_wpHandleCommentSubmission extends WP_UnitTestCase { $this->assertNotWPError( $comment ); $this->assertInstanceOf( 'WP_Comment', $comment ); $this->assertStringNotContainsString( 'comment_content ); - } public function test_unprivileged_user_cannot_comment_unfiltered_html() { @@ -458,7 +442,6 @@ class Tests_Comment_wpHandleCommentSubmission extends WP_UnitTestCase { $this->assertNotWPError( $comment ); $this->assertInstanceOf( 'WP_Comment', $comment ); $this->assertStringNotContainsString( 'comment_content ); - } public function test_unprivileged_user_cannot_comment_unfiltered_html_even_with_valid_nonce() { @@ -482,7 +465,6 @@ class Tests_Comment_wpHandleCommentSubmission extends WP_UnitTestCase { $this->assertNotWPError( $comment ); $this->assertInstanceOf( 'WP_Comment', $comment ); $this->assertStringNotContainsString( 'comment_content ); - } public function test_privileged_user_can_comment_unfiltered_html_with_valid_nonce() { @@ -514,7 +496,6 @@ class Tests_Comment_wpHandleCommentSubmission extends WP_UnitTestCase { $this->assertNotWPError( $comment ); $this->assertInstanceOf( 'WP_Comment', $comment ); $this->assertStringContainsString( 'comment_content ); - } public function test_privileged_user_cannot_comment_unfiltered_html_without_valid_nonce() { @@ -538,7 +519,6 @@ class Tests_Comment_wpHandleCommentSubmission extends WP_UnitTestCase { $this->assertNotWPError( $comment ); $this->assertInstanceOf( 'WP_Comment', $comment ); $this->assertStringNotContainsString( 'comment_content ); - } public function test_submitting_comment_as_anonymous_user_when_registration_required_returns_error() { @@ -557,7 +537,6 @@ class Tests_Comment_wpHandleCommentSubmission extends WP_UnitTestCase { $this->assertWPError( $comment ); $this->assertSame( $error, $comment->get_error_code() ); - } public function test_submitting_comment_with_no_name_when_name_email_required_returns_error() { @@ -578,7 +557,6 @@ class Tests_Comment_wpHandleCommentSubmission extends WP_UnitTestCase { $this->assertWPError( $comment ); $this->assertSame( $error, $comment->get_error_code() ); - } public function test_submitting_comment_with_no_email_when_name_email_required_returns_error() { @@ -599,7 +577,6 @@ class Tests_Comment_wpHandleCommentSubmission extends WP_UnitTestCase { $this->assertWPError( $comment ); $this->assertSame( $error, $comment->get_error_code() ); - } public function test_submitting_comment_with_invalid_email_when_name_email_required_returns_error() { @@ -621,7 +598,6 @@ class Tests_Comment_wpHandleCommentSubmission extends WP_UnitTestCase { $this->assertWPError( $comment ); $this->assertSame( $error, $comment->get_error_code() ); - } public function test_submitting_comment_with_no_comment_content_returns_error() { @@ -638,7 +614,6 @@ class Tests_Comment_wpHandleCommentSubmission extends WP_UnitTestCase { $this->assertWPError( $comment ); $this->assertSame( $error, $comment->get_error_code() ); - } /** @@ -788,7 +763,6 @@ class Tests_Comment_wpHandleCommentSubmission extends WP_UnitTestCase { ), $this->preprocess_comment_data ); - } /** diff --git a/tests/phpunit/tests/compat/arrayKeyFirst.php b/tests/phpunit/tests/compat/arrayKeyFirst.php index 613845aba0..b3b97ad464 100644 --- a/tests/phpunit/tests/compat/arrayKeyFirst.php +++ b/tests/phpunit/tests/compat/arrayKeyFirst.php @@ -32,7 +32,6 @@ class Tests_Compat_arrayKeyFirst extends WP_UnitTestCase { array_key_first( $arr ) ); } - } /** diff --git a/tests/phpunit/tests/compat/strContains.php b/tests/phpunit/tests/compat/strContains.php index c49cb19f23..ee5bb6e1d3 100644 --- a/tests/phpunit/tests/compat/strContains.php +++ b/tests/phpunit/tests/compat/strContains.php @@ -34,7 +34,6 @@ class Tests_Compat_strContains extends WP_UnitTestCase { str_contains( $haystack, $needle ) ); } - } /** diff --git a/tests/phpunit/tests/compat/strEndsWith.php b/tests/phpunit/tests/compat/strEndsWith.php index 75522d6f49..7cf1e2b15d 100644 --- a/tests/phpunit/tests/compat/strEndsWith.php +++ b/tests/phpunit/tests/compat/strEndsWith.php @@ -34,7 +34,6 @@ class Tests_Compat_StrEndsWith extends WP_UnitTestCase { str_ends_with( $haystack, $needle ) ); } - } /** diff --git a/tests/phpunit/tests/compat/strStartsWith.php b/tests/phpunit/tests/compat/strStartsWith.php index 9e12ced33b..6bf72cd621 100644 --- a/tests/phpunit/tests/compat/strStartsWith.php +++ b/tests/phpunit/tests/compat/strStartsWith.php @@ -34,7 +34,6 @@ class Tests_Compat_StrStartsWith extends WP_UnitTestCase { str_starts_with( $haystack, $needle ) ); } - } /** diff --git a/tests/phpunit/tests/cron.php b/tests/phpunit/tests/cron.php index e2799b8fe3..6369a244c6 100644 --- a/tests/phpunit/tests/cron.php +++ b/tests/phpunit/tests/cron.php @@ -53,7 +53,6 @@ class Tests_Cron extends WP_UnitTestCase { // It's a non-recurring event. $this->assertFalse( wp_get_schedule( $hook ) ); - } /** @@ -708,7 +707,6 @@ class Tests_Cron extends WP_UnitTestCase { $this->assertFalse( wp_get_scheduled_event( $hook, $args, strtotime( '+30 minutes' ) ) ); // - Invalid timestamp. $this->assertFalse( wp_get_scheduled_event( $hook, $args, 'Words Fail!' ) ); - } /** @@ -767,7 +765,6 @@ class Tests_Cron extends WP_UnitTestCase { $subsequent = wp_schedule_single_event( $ts3, $hook, $args, true ); $this->assertWPError( $subsequent ); $this->assertSame( 'duplicate_event', $subsequent->get_error_code() ); - } /** diff --git a/tests/phpunit/tests/customize/nav-menus.php b/tests/phpunit/tests/customize/nav-menus.php index 6cc8f3d08c..e0c80d1a56 100644 --- a/tests/phpunit/tests/customize/nav-menus.php +++ b/tests/phpunit/tests/customize/nav-menus.php @@ -655,7 +655,6 @@ class Test_WP_Customize_Nav_Menus extends WP_UnitTestCase { add_filter( 'customize_nav_menu_available_item_types', array( $this, 'filter_item_types' ) ); $this->assertSame( $expected, $menus->available_item_types() ); remove_filter( 'customize_nav_menu_available_item_types', array( $this, 'filter_item_types' ) ); - } /** diff --git a/tests/phpunit/tests/date/query.php b/tests/phpunit/tests/date/query.php index 7fc21f3878..bf20e01cb0 100644 --- a/tests/phpunit/tests/date/query.php +++ b/tests/phpunit/tests/date/query.php @@ -579,7 +579,6 @@ class Tests_Date_Query extends WP_UnitTestCase { $message = "Expected {$expected}, got {$found}"; $this->assertEqualsWithDelta( strtotime( $expected ), strtotime( $found ), 10, $message ); - } public function data_build_mysql_datetime_with_custom_timezone() { @@ -1021,7 +1020,6 @@ class Tests_Date_Query extends WP_UnitTestCase { foreach ( $seconds as $second ) { $this->assertFalse( $this->q->validate_date_values( array( 'second' => $second ) ) ); } - } /** diff --git a/tests/phpunit/tests/db/dbDelta.php b/tests/phpunit/tests/db/dbDelta.php index 03426fa721..899f85c5d6 100644 --- a/tests/phpunit/tests/db/dbDelta.php +++ b/tests/phpunit/tests/db/dbDelta.php @@ -311,7 +311,6 @@ class Tests_DB_dbDelta extends WP_UnitTestCase { ); $this->assertTableRowHasValue( 'column_1', 'wcphilly2015', $wpdb->prefix . 'dbdelta_test' ); - } /** diff --git a/tests/phpunit/tests/dependencies.php b/tests/phpunit/tests/dependencies.php index e5a7a33a7c..39a2860fc3 100644 --- a/tests/phpunit/tests/dependencies.php +++ b/tests/phpunit/tests/dependencies.php @@ -27,7 +27,6 @@ class Tests_Dependencies extends WP_UnitTestCase { $this->assertFalse( $dep->query( 'one' ) ); $this->assertInstanceOf( '_WP_Dependency', $dep->query( 'two' ) ); - } public function test_enqueue() { @@ -134,7 +133,6 @@ class Tests_Dependencies extends WP_UnitTestCase { $dep->remove( 'one' ); $this->assertFalse( $dep->query( 'one' ) ); - } public function test_enqueue_before_register() { diff --git a/tests/phpunit/tests/dependencies/styles.php b/tests/phpunit/tests/dependencies/styles.php index 4b1e46f21d..da79c2812d 100644 --- a/tests/phpunit/tests/dependencies/styles.php +++ b/tests/phpunit/tests/dependencies/styles.php @@ -186,7 +186,6 @@ class Tests_Dependencies_Styles extends WP_UnitTestCase { wp_print_styles(); $this->assertSame( $expected, $wp_styles->print_html ); - } /** @@ -279,7 +278,6 @@ class Tests_Dependencies_Styles extends WP_UnitTestCase { // No styles left to print. $this->assertSame( $expected, get_echo( 'wp_print_styles' ) ); - } /** @@ -304,7 +302,6 @@ class Tests_Dependencies_Styles extends WP_UnitTestCase { wp_add_inline_style( 'handle', $style ); $this->assertSame( $expected, get_echo( 'wp_print_styles' ) ); - } /** @@ -319,7 +316,6 @@ class Tests_Dependencies_Styles extends WP_UnitTestCase { wp_enqueue_style( 'handle', 'http://example.com', array(), 1 ); $this->assertSame( $expected, get_echo( 'wp_print_styles' ) ); - } /** diff --git a/tests/phpunit/tests/editor/navigation-fallback.php b/tests/phpunit/tests/editor/navigation-fallback.php index 50f5ffccd2..6cdf1b35be 100644 --- a/tests/phpunit/tests/editor/navigation-fallback.php +++ b/tests/phpunit/tests/editor/navigation-fallback.php @@ -191,7 +191,6 @@ class WP_Navigation_Fallback_Test extends WP_UnitTestCase { // Check that only a single Navigation fallback was created. $navs_in_db = $this->get_navigations_in_database(); $this->assertCount( 1, $navs_in_db, 'A single Navigation menu should be present in the database.' ); - } /** @@ -348,7 +347,6 @@ class WP_Navigation_Fallback_Test extends WP_UnitTestCase { $navs_in_db = $this->get_navigations_in_database(); $this->assertCount( 1, $navs_in_db, 'Only the existing Navigation menus should be present in the database.' ); - } private function get_navigations_in_database() { diff --git a/tests/phpunit/tests/feed/atom.php b/tests/phpunit/tests/feed/atom.php index c88592ec9a..403f1152a4 100644 --- a/tests/phpunit/tests/feed/atom.php +++ b/tests/phpunit/tests/feed/atom.php @@ -56,7 +56,6 @@ class Tests_Feed_Atom extends WP_UnitTestCase { // Assign a tagline option. update_option( 'blogdescription', 'Just another WordPress site' ); - } /** diff --git a/tests/phpunit/tests/feed/rss2.php b/tests/phpunit/tests/feed/rss2.php index a3f45e0896..6fd0ba8c15 100644 --- a/tests/phpunit/tests/feed/rss2.php +++ b/tests/phpunit/tests/feed/rss2.php @@ -64,7 +64,6 @@ class Tests_Feed_RSS2 extends WP_UnitTestCase { // Assign a tagline option. update_option( 'blogdescription', 'Just another WordPress site' ); - } /** @@ -506,7 +505,6 @@ class Tests_Feed_RSS2 extends WP_UnitTestCase { array( '/?feed=rss2', 'rss' ), array( '/?feed=commentsrss2', 'rss' ), ); - } /** diff --git a/tests/phpunit/tests/filesystem/findFolder.php b/tests/phpunit/tests/filesystem/findFolder.php index 5eda573275..59e9e8c605 100644 --- a/tests/phpunit/tests/filesystem/findFolder.php +++ b/tests/phpunit/tests/filesystem/findFolder.php @@ -24,7 +24,6 @@ class WP_Filesystem_Find_Folder_Test extends WP_Filesystem_UnitTestCase { $path = $fs->find_folder( '/this/directory/doesnt/exist/' ); $this->assertFalse( $path ); - } public function test_sibling_wordpress_in_subdir() { @@ -48,7 +47,6 @@ class WP_Filesystem_Find_Folder_Test extends WP_Filesystem_UnitTestCase { $path = $fs->find_folder( '/var/www/wp.example.com/wordpress/wp-content/' ); $this->assertSame( '/www/wp.example.com/wordpress/wp-content/', $path ); - } /** @@ -76,7 +74,6 @@ class WP_Filesystem_Find_Folder_Test extends WP_Filesystem_UnitTestCase { $path = $fs->abspath( '/var/www/example.com/' ); $this->assertSame( '/', $path ); - } /** diff --git a/tests/phpunit/tests/filters.php b/tests/phpunit/tests/filters.php index fed43735fc..04a5f9e915 100644 --- a/tests/phpunit/tests/filters.php +++ b/tests/phpunit/tests/filters.php @@ -42,7 +42,6 @@ class Tests_Filters extends WP_UnitTestCase { $this->assertSame( $val, apply_filters( $hook_name, $val ) ); $this->assertSame( 1, $a->get_call_count() ); $this->assertSame( array( $hook_name ), $a->get_hook_names() ); - } public function test_has_filter() { @@ -174,7 +173,6 @@ class Tests_Filters extends WP_UnitTestCase { // $hook_name1's count hasn't changed, $hook_name2 should be correct. $this->assertSame( 1, did_filter( $hook_name1 ) ); $this->assertSame( $count, did_filter( $hook_name2 ) ); - } public function test_all_filter() { @@ -198,7 +196,6 @@ class Tests_Filters extends WP_UnitTestCase { remove_filter( 'all', array( $a, 'filterall' ) ); $this->assertFalse( has_filter( 'all', array( $a, 'filterall' ) ) ); - } public function test_remove_all_filter() { @@ -332,7 +329,6 @@ class Tests_Filters extends WP_UnitTestCase { // Just in case we don't trust assertSame(). $obj->foo = true; $this->assertNotEmpty( $args[0][1]->foo ); - } /** diff --git a/tests/phpunit/tests/formatting/escUrl.php b/tests/phpunit/tests/formatting/escUrl.php index faccb2846a..f23b5269e5 100644 --- a/tests/phpunit/tests/formatting/escUrl.php +++ b/tests/phpunit/tests/formatting/escUrl.php @@ -151,7 +151,6 @@ class Tests_Formatting_EscUrl extends WP_UnitTestCase { ) ) ); - } /** diff --git a/tests/phpunit/tests/formatting/sanitizeTextField.php b/tests/phpunit/tests/formatting/sanitizeTextField.php index 2d184ebb13..d7a58486d1 100644 --- a/tests/phpunit/tests/formatting/sanitizeTextField.php +++ b/tests/phpunit/tests/formatting/sanitizeTextField.php @@ -22,7 +22,6 @@ class Tests_Formatting_SanitizeTextField extends WP_UnitTestCase { } $this->assertSame( $expected_oneline, sanitize_text_field( $str ) ); $this->assertSameIgnoreEOL( $expected_multiline, sanitize_textarea_field( $str ) ); - } public function data_sanitize_text_field() { diff --git a/tests/phpunit/tests/formatting/wpTexturize.php b/tests/phpunit/tests/formatting/wpTexturize.php index ee7ce5f779..3202db4ba7 100644 --- a/tests/phpunit/tests/formatting/wpTexturize.php +++ b/tests/phpunit/tests/formatting/wpTexturize.php @@ -32,7 +32,6 @@ class Tests_Formatting_wpTexturize extends WP_UnitTestCase { $invalid_nest = '
"baba"
'; $this->assertSame( $invalid_nest, wptexturize( $invalid_nest ) ); - } /** diff --git a/tests/phpunit/tests/general/wpResourceHints.php b/tests/phpunit/tests/general/wpResourceHints.php index 03a4c024e0..d0ece5d9ac 100644 --- a/tests/phpunit/tests/general/wpResourceHints.php +++ b/tests/phpunit/tests/general/wpResourceHints.php @@ -147,7 +147,6 @@ class Tests_General_wpResourceHints extends WP_UnitTestCase { wp_dequeue_style( 'googlefonts' ); $this->assertSame( $expected, $actual ); - } public function test_dns_prefetch_scripts() { diff --git a/tests/phpunit/tests/http/base.php b/tests/phpunit/tests/http/base.php index 976827c4af..8a6ce3b3b0 100644 --- a/tests/phpunit/tests/http/base.php +++ b/tests/phpunit/tests/http/base.php @@ -314,7 +314,6 @@ abstract class WP_HTTP_UnitTestCase extends WP_UnitTestCase { $this->skipTestOnTimeout( $res ); $this->assertNotWPError( $res ); $this->assertSame( $size, $filesize ); // Check that the file is written to disk correctly without any extra characters. - } /** @@ -408,7 +407,6 @@ abstract class WP_HTTP_UnitTestCase extends WP_UnitTestCase { $this->skipTestOnTimeout( $res ); $this->assertSame( 'PASS', wp_remote_retrieve_body( $res ) ); - } /** diff --git a/tests/phpunit/tests/http/http.php b/tests/phpunit/tests/http/http.php index 47d169e619..876a5ed60b 100644 --- a/tests/phpunit/tests/http/http.php +++ b/tests/phpunit/tests/http/http.php @@ -292,7 +292,6 @@ class Tests_HTTP_HTTP extends WP_UnitTestCase { get_status_header_desc( 200 ); $this->assertSame( array_keys( $wp_header_to_desc ), array_values( $constants ) ); - } /** diff --git a/tests/phpunit/tests/image/header.php b/tests/phpunit/tests/image/header.php index 6b480a953c..afb9feb61f 100644 --- a/tests/phpunit/tests/image/header.php +++ b/tests/phpunit/tests/image/header.php @@ -30,7 +30,6 @@ class Tests_Image_Header extends WP_UnitTestCase { ); $this->assertSame( 1200, $dimensions['dst_width'] ); $this->assertSame( 230, $dimensions['dst_height'] ); - } public function test_header_image_has_correct_dimensions_with_fixed() { @@ -50,7 +49,6 @@ class Tests_Image_Header extends WP_UnitTestCase { ); $this->assertSame( 1200, $dimensions['dst_width'] ); $this->assertSame( 230, $dimensions['dst_height'] ); - } public function test_header_image_has_correct_dimensions_with_flex_height() { @@ -70,7 +68,6 @@ class Tests_Image_Header extends WP_UnitTestCase { ); $this->assertSame( 1200, $dimensions['dst_width'] ); $this->assertSame( 900, $dimensions['dst_height'] ); - } public function test_header_image_has_correct_dimensions_with_flex_width() { @@ -90,7 +87,6 @@ class Tests_Image_Header extends WP_UnitTestCase { ); $this->assertSame( 1500, $dimensions['dst_width'] ); // Max width. $this->assertSame( 230, $dimensions['dst_height'] ); - } public function test_header_image_has_correct_dimensions_with_flex_width_and_height() { @@ -110,7 +106,6 @@ class Tests_Image_Header extends WP_UnitTestCase { ); $this->assertSame( 1600, $dimensions['dst_width'] ); $this->assertSame( 1200, $dimensions['dst_height'] ); - } public function test_create_attachment_object() { diff --git a/tests/phpunit/tests/l10n/getLocale.php b/tests/phpunit/tests/l10n/getLocale.php index 5044e6ea87..1f16448318 100644 --- a/tests/phpunit/tests/l10n/getLocale.php +++ b/tests/phpunit/tests/l10n/getLocale.php @@ -74,7 +74,6 @@ class Tests_L10n_GetLocale extends WP_UnitTestCase { $locale = $old_locale; $this->assertSame( 'es_ES', $found ); - } public function test_should_fall_back_on_en_US() { diff --git a/tests/phpunit/tests/link/themeFile.php b/tests/phpunit/tests/link/themeFile.php index 711689c4a4..5d8fe66442 100644 --- a/tests/phpunit/tests/link/themeFile.php +++ b/tests/phpunit/tests/link/themeFile.php @@ -129,7 +129,6 @@ class Tests_Link_ThemeFile extends WP_UnitTestCase { } else { $this->assertFileDoesNotExist( WP_CONTENT_DIR . "/themes/theme-file-parent/{$file}" ); } - } /** diff --git a/tests/phpunit/tests/media.php b/tests/phpunit/tests/media.php index 54ac0b71b5..545d1c854f 100644 --- a/tests/phpunit/tests/media.php +++ b/tests/phpunit/tests/media.php @@ -202,7 +202,6 @@ CAP; ) ); $this->assertSame( 1, substr_count( $result, 'wp-caption alignnone some-class another-class' ) ); - } public function test_new_img_caption_shortcode_with_html_caption() { @@ -1743,7 +1742,6 @@ EOF; $expected_srcset = $this->src_first( $_expected, $image_url, $size_array[0] ); $this->assertSame( $expected_srcset, wp_calculate_image_srcset( $size_array, $image_url, $image_meta ) ); } - } /** diff --git a/tests/phpunit/tests/media/getPostGalleries.php b/tests/phpunit/tests/media/getPostGalleries.php index 363fea8149..97415b54f8 100644 --- a/tests/phpunit/tests/media/getPostGalleries.php +++ b/tests/phpunit/tests/media/getPostGalleries.php @@ -870,7 +870,6 @@ BLOB; ), $galleries ); - } /** @@ -937,7 +936,6 @@ BLOB; ), $galleries ); - } /** diff --git a/tests/phpunit/tests/menu/wp-nav-menu.php b/tests/phpunit/tests/menu/wp-nav-menu.php index 298b222e01..72f5932ad0 100644 --- a/tests/phpunit/tests/menu/wp-nav-menu.php +++ b/tests/phpunit/tests/menu/wp-nav-menu.php @@ -243,6 +243,5 @@ class Tests_Menu_wpNavMenu extends WP_UnitTestCase { $menu_html, 'The level zero menu item should appear in the menu.' ); - } } diff --git a/tests/phpunit/tests/meta/registerMeta.php b/tests/phpunit/tests/meta/registerMeta.php index ae2c1d6e63..4b08e4d82b 100644 --- a/tests/phpunit/tests/meta/registerMeta.php +++ b/tests/phpunit/tests/meta/registerMeta.php @@ -546,7 +546,6 @@ class Tests_Meta_Register_Meta extends WP_UnitTestCase { update_metadata( $object_type, $object_id, $meta_key, $meta_value ); $value = get_metadata( $object_type, $object_id, $meta_key, true ); $this->assertSame( $value, $meta_value ); - } /** diff --git a/tests/phpunit/tests/multisite/site.php b/tests/phpunit/tests/multisite/site.php index 2bcfd89f33..4b201cd912 100644 --- a/tests/phpunit/tests/multisite/site.php +++ b/tests/phpunit/tests/multisite/site.php @@ -1162,7 +1162,6 @@ if ( is_multisite() ) : remove_action( 'clean_site_cache', array( $this, 'action_database_insert_on_clean_site_cache' ) ); $this->assertIsInt( $site_id ); - } public function action_database_insert_on_clean_site_cache() { @@ -2194,7 +2193,6 @@ if ( is_multisite() ) : $fetched_site = get_site( $new_site_id ); $this->assertInstanceOf( 'WP_Site', $fetched_site ); $this->assertEquals( $new_site_id, $fetched_site->blog_id ); - } /** diff --git a/tests/phpunit/tests/pluggable/signatures.php b/tests/phpunit/tests/pluggable/signatures.php index c63de073d9..84a828d348 100644 --- a/tests/phpunit/tests/pluggable/signatures.php +++ b/tests/phpunit/tests/pluggable/signatures.php @@ -47,7 +47,6 @@ class Tests_Pluggable_Signatures extends WP_UnitTestCase { $i++; } - } /** @@ -66,7 +65,6 @@ class Tests_Pluggable_Signatures extends WP_UnitTestCase { $this->assertTrue( function_exists( $function ), $msg ); $this->assertContains( $function, $defined, $msg ); } - } /** @@ -113,7 +111,6 @@ class Tests_Pluggable_Signatures extends WP_UnitTestCase { } return $data; - } /** diff --git a/tests/phpunit/tests/pomo/mo.php b/tests/phpunit/tests/pomo/mo.php index e4ce6c4b16..7ae73abf6c 100644 --- a/tests/phpunit/tests/pomo/mo.php +++ b/tests/phpunit/tests/pomo/mo.php @@ -70,7 +70,6 @@ class Tests_POMO_MO extends WP_UnitTestCase { ); $this->assertEquals( $single_entry, $mo->entries[ $single_entry->key() ] ); $this->assertSame( 'not so dragon', $mo->entries[ $single_entry->key() ]->context ); - } public function test_translations_merge() { diff --git a/tests/phpunit/tests/post/filtering.php b/tests/phpunit/tests/post/filtering.php index c4d393be22..5947a29d43 100644 --- a/tests/phpunit/tests/post/filtering.php +++ b/tests/phpunit/tests/post/filtering.php @@ -14,7 +14,6 @@ class Tests_Post_Filtering extends WP_UnitTestCase { parent::set_up(); update_option( 'use_balanceTags', 1 ); kses_init_filters(); - } public function tear_down() { diff --git a/tests/phpunit/tests/post/getPages.php b/tests/phpunit/tests/post/getPages.php index e72ba3e2ed..c0aa28564d 100644 --- a/tests/phpunit/tests/post/getPages.php +++ b/tests/phpunit/tests/post/getPages.php @@ -905,7 +905,6 @@ class Tests_Post_GetPages extends WP_UnitTestCase { // How it should work. $found_pages = wp_list_filter( $pages, array( 'post_parent' => $page_1 ) ); $this->assertSameSets( array( $page_3, $page_5 ), wp_list_pluck( $found_pages, 'ID' ) ); - } /** diff --git a/tests/phpunit/tests/post/meta.php b/tests/phpunit/tests/post/meta.php index 0efca37f6b..84a8558b75 100644 --- a/tests/phpunit/tests/post/meta.php +++ b/tests/phpunit/tests/post/meta.php @@ -64,7 +64,6 @@ class Tests_Post_Meta extends WP_UnitTestCase { // Check it is deleted. $this->assertSame( '', get_post_meta( self::$post_id, 'unique', true ) ); $this->assertSame( array(), get_post_meta( self::$post_id, 'unique', false ) ); - } public function test_nonunique_postmeta() { @@ -128,7 +127,6 @@ class Tests_Post_Meta extends WP_UnitTestCase { $this->assertSame( array( 'new' ), get_post_meta( self::$post_id, 'unique_update', false ) ); $this->assertSame( 'new', get_post_meta( self::$post_id, 'nonunique_update', true ) ); $this->assertSame( array( 'new', 'another new' ), get_post_meta( self::$post_id, 'nonunique_update', false ) ); - } public function test_delete_post_meta() { @@ -145,7 +143,6 @@ class Tests_Post_Meta extends WP_UnitTestCase { // Check the other still exists. $this->assertSame( 'value', get_post_meta( self::$post_id_2, 'unique_delete', true ) ); - } public function test_delete_post_meta_by_key() { @@ -249,7 +246,6 @@ class Tests_Post_Meta extends WP_UnitTestCase { // Check it exists. $this->assertEqualSets( $funky_meta, get_post_meta( self::$post_id, 'test_funky_post_meta', true ) ); - } /** diff --git a/tests/phpunit/tests/post/nav-menu.php b/tests/phpunit/tests/post/nav-menu.php index a9cfe20e41..625d1bc12c 100644 --- a/tests/phpunit/tests/post/nav-menu.php +++ b/tests/phpunit/tests/post/nav-menu.php @@ -57,7 +57,6 @@ class Tests_Post_Nav_Menu extends WP_UnitTestCase { // After falling back, the markup should not include whitespace around
  • 's. $this->assertDoesNotMatchRegularExpression( '/\s|<\/li>\s/U', $menu ); $this->assertMatchesRegularExpression( '/>|<\/li> $custom_item_id ) ); $custom_item = array_pop( $custom_item ); $this->assertSame( 'WordPress.org', $custom_item->title ); - } public function test_wp_get_nav_menu_items_with_taxonomy_term() { @@ -763,7 +761,6 @@ class Tests_Post_Nav_Menu extends WP_UnitTestCase { remove_filter( 'nav_menu_item_title', array( $this, 'confirm_third_param_args_object' ), 10, 3 ); remove_filter( 'walker_nav_menu_start_el', array( $this, 'confirm_forth_param_args_object' ), 10, 4 ); - } /** diff --git a/tests/phpunit/tests/post/wpInsertPost.php b/tests/phpunit/tests/post/wpInsertPost.php index 167d29dd39..1b0838cf06 100644 --- a/tests/phpunit/tests/post/wpInsertPost.php +++ b/tests/phpunit/tests/post/wpInsertPost.php @@ -304,7 +304,6 @@ class Tests_Post_wpInsertPost extends WP_UnitTestCase { // There should be a publish_future_post hook scheduled on the future date. $this->assertFalse( $this->next_schedule_for_post( 'publish_future_post', $post_id ) ); - } /** @@ -650,7 +649,6 @@ class Tests_Post_wpInsertPost extends WP_UnitTestCase { $this->assertInstanceOf( 'WP_Error', wp_insert_post( $post, true ) ); $this->assertInstanceOf( 'WP_Error', wp_update_post( $post, true ) ); - } /** diff --git a/tests/phpunit/tests/query/commentCount.php b/tests/phpunit/tests/query/commentCount.php index c5e0d4d2d6..d995c4b422 100644 --- a/tests/phpunit/tests/query/commentCount.php +++ b/tests/phpunit/tests/query/commentCount.php @@ -190,7 +190,6 @@ class Tests_Query_CommentCount extends WP_UnitTestCase { } $this->assertSameSets( $expected, $found_post_ids ); - } public function test_operator_equal_or_greater_than() { $args = array( diff --git a/tests/phpunit/tests/query/conditionals.php b/tests/phpunit/tests/query/conditionals.php index b365a1207f..8eed70288b 100644 --- a/tests/phpunit/tests/query/conditionals.php +++ b/tests/phpunit/tests/query/conditionals.php @@ -395,7 +395,6 @@ class Tests_Query_Conditionals extends WP_UnitTestCase { $this->go_to( "/{$feed}/" ); $this->assertQueryTrue( 'is_feed' ); } - } public function test_main_feed() { @@ -440,7 +439,6 @@ class Tests_Query_Conditionals extends WP_UnitTestCase { $this->go_to( "/comments/{$type}" ); $this->assertQueryTrue( 'is_feed', 'is_comment_feed' ); } - } // 'search/(.+)/feed/(feed|rdf|rss|rss2|atom)/?$' => 'index.php?s=$matches[1]&feed=$matches[2]', @@ -771,7 +769,6 @@ class Tests_Query_Conditionals extends WP_UnitTestCase { $this->go_to( get_permalink( $post_id ) . '2/' ); // Should is_paged be true also? $this->assertQueryTrue( 'is_single', 'is_singular' ); - } // '[0-9]{4}/[0-9]{1,2}/[0-9]{1,2}/[^/]+/([^/]+)/?$' => 'index.php?attachment=$matches[1]', diff --git a/tests/phpunit/tests/query/metaQuery.php b/tests/phpunit/tests/query/metaQuery.php index c9e73ec8a5..e930ef3266 100644 --- a/tests/phpunit/tests/query/metaQuery.php +++ b/tests/phpunit/tests/query/metaQuery.php @@ -1920,7 +1920,6 @@ class Tests_Query_MetaQuery extends WP_UnitTestCase { ); $this->assertSameSets( array( $posts[0] ), $q->posts ); - } /** diff --git a/tests/phpunit/tests/query/results.php b/tests/phpunit/tests/query/results.php index bf653d378a..40d05a4d9f 100644 --- a/tests/phpunit/tests/query/results.php +++ b/tests/phpunit/tests/query/results.php @@ -768,7 +768,6 @@ class Tests_Query_Results extends WP_UnitTestCase { $this->assertIsInt( $post->ID ); $this->assertIsInt( $post->post_parent ); } - } /** diff --git a/tests/phpunit/tests/rest-api/rest-attachments-controller.php b/tests/phpunit/tests/rest-api/rest-attachments-controller.php index 55cf74f3d7..aca3c794f9 100644 --- a/tests/phpunit/tests/rest-api/rest-attachments-controller.php +++ b/tests/phpunit/tests/rest-api/rest-attachments-controller.php @@ -1787,7 +1787,6 @@ class WP_Test_REST_Attachments_Controller extends WP_Test_REST_Post_Type_Control } $this->assertSame( wp_get_attachment_url( $attachment->ID ), $data['source_url'] ); - } /** diff --git a/tests/phpunit/tests/rest-api/rest-autosaves-controller.php b/tests/phpunit/tests/rest-api/rest-autosaves-controller.php index e987a5f699..fd8f92f7b0 100644 --- a/tests/phpunit/tests/rest-api/rest-autosaves-controller.php +++ b/tests/phpunit/tests/rest-api/rest-autosaves-controller.php @@ -259,7 +259,6 @@ class WP_Test_REST_Autosaves_Controller extends WP_Test_REST_Post_Type_Controlle $request = new WP_REST_Request( 'GET', '/wp/v2/posts/' . REST_TESTS_IMPOSSIBLY_HIGH_NUMBER . '/autosaves/' . self::$autosave_post_id ); $response = rest_get_server()->dispatch( $request ); $this->assertErrorResponse( 'rest_post_invalid_parent', $response, 404 ); - } public function test_get_item_invalid_parent_post_type() { diff --git a/tests/phpunit/tests/rest-api/rest-block-type-controller.php b/tests/phpunit/tests/rest-api/rest-block-type-controller.php index b19321e224..af6fa73a3a 100644 --- a/tests/phpunit/tests/rest-api/rest-block-type-controller.php +++ b/tests/phpunit/tests/rest-api/rest-block-type-controller.php @@ -138,7 +138,6 @@ class REST_Block_Type_Controller_Test extends WP_Test_REST_Controller_Testcase { $response = rest_get_server()->dispatch( $request ); $data = $response->get_data(); $this->assertSameSets( array( $block_styles ), $data['styles'] ); - } /** @@ -179,7 +178,6 @@ class REST_Block_Type_Controller_Test extends WP_Test_REST_Controller_Testcase { ), ); $this->assertSameSets( $expected, $data['styles'] ); - } /** @@ -263,7 +261,6 @@ class REST_Block_Type_Controller_Test extends WP_Test_REST_Controller_Testcase { $this->assertNull( $data['view_script'] ); $this->assertNull( $data['editor_style'] ); $this->assertNull( $data['style'] ); - } /** @@ -579,7 +576,6 @@ class REST_Block_Type_Controller_Test extends WP_Test_REST_Controller_Testcase { $this->assertArrayHasKey( 'view_script', $properties ); $this->assertArrayHasKey( 'editor_style', $properties ); $this->assertArrayHasKey( 'style', $properties ); - } /** diff --git a/tests/phpunit/tests/rest-api/rest-controller.php b/tests/phpunit/tests/rest-api/rest-controller.php index f7da75327a..33ac4f3c81 100644 --- a/tests/phpunit/tests/rest-api/rest-controller.php +++ b/tests/phpunit/tests/rest-api/rest-controller.php @@ -362,7 +362,6 @@ class WP_Test_REST_Controller extends WP_Test_REST_TestCase { // Ignored properties. $this->assertArrayNotHasKey( 'ignored_prop', $args['someobject'] ); - } /** diff --git a/tests/phpunit/tests/rest-api/rest-navigation-fallback-controller.php b/tests/phpunit/tests/rest-api/rest-navigation-fallback-controller.php index b2374f3ff6..43111020e2 100644 --- a/tests/phpunit/tests/rest-api/rest-navigation-fallback-controller.php +++ b/tests/phpunit/tests/rest-api/rest-navigation-fallback-controller.php @@ -92,7 +92,6 @@ class WP_REST_Navigation_Fallback_Controller_Test extends WP_Test_REST_Controlle $navs_in_db = $this->get_navigations_in_database(); $this->assertCount( 1, $navs_in_db, 'Only a single Navigation menu should be present in the database.' ); - } /** diff --git a/tests/phpunit/tests/rest-api/rest-pattern-directory-controller.php b/tests/phpunit/tests/rest-api/rest-pattern-directory-controller.php index 77b99af76b..d8f15013b9 100644 --- a/tests/phpunit/tests/rest-api/rest-pattern-directory-controller.php +++ b/tests/phpunit/tests/rest-api/rest-pattern-directory-controller.php @@ -653,7 +653,6 @@ class WP_REST_Pattern_Directory_Controller_Test extends WP_Test_REST_Controller_ } else { $this->assertNotSame( $result_1, $result_2, $message ); } - } /** diff --git a/tests/phpunit/tests/rest-api/rest-posts-controller.php b/tests/phpunit/tests/rest-api/rest-posts-controller.php index 353325fc81..2722cfa734 100644 --- a/tests/phpunit/tests/rest-api/rest-posts-controller.php +++ b/tests/phpunit/tests/rest-api/rest-posts-controller.php @@ -4302,7 +4302,6 @@ class WP_Test_REST_Posts_Controller extends WP_Test_REST_Post_Type_Controller_Te $routes = rest_get_server()->get_routes(); $this->assertArrayNotHasKey( '/wp/v2/invalid-controller', $routes ); _unregister_post_type( 'invalid-controller' ); - } public function test_get_item_schema() { @@ -5028,7 +5027,6 @@ class WP_Test_REST_Posts_Controller extends WP_Test_REST_Post_Type_Controller_Te $this->assertSame( 200, $response->get_status() ); $this->assertArrayNotHasKey( 'permalink_template', $data ); $this->assertArrayNotHasKey( 'generated_slug', $data ); - } /** diff --git a/tests/phpunit/tests/rest-api/rest-sidebars-controller.php b/tests/phpunit/tests/rest-api/rest-sidebars-controller.php index 8210d916f3..8dab4f6ba9 100644 --- a/tests/phpunit/tests/rest-api/rest-sidebars-controller.php +++ b/tests/phpunit/tests/rest-api/rest-sidebars-controller.php @@ -311,7 +311,6 @@ class WP_Test_REST_Sidebars_Controller extends WP_Test_REST_Controller_Testcase ), $data ); - } /** diff --git a/tests/phpunit/tests/rest-api/rest-users-controller.php b/tests/phpunit/tests/rest-api/rest-users-controller.php index 8373f8d200..72c1f7d6e2 100644 --- a/tests/phpunit/tests/rest-api/rest-users-controller.php +++ b/tests/phpunit/tests/rest-api/rest-users-controller.php @@ -632,7 +632,6 @@ class WP_Test_REST_Users_Controller extends WP_Test_REST_Controller_Testcase { $response = rest_get_server()->dispatch( $request ); $data = $response->get_data(); $this->assertCount( 0, $data ); - } public function test_get_items_exclude_query() { @@ -2701,7 +2700,6 @@ class WP_Test_REST_Users_Controller extends WP_Test_REST_Controller_Testcase { $this->assertArrayHasKey( 'url', $properties ); $this->assertArrayHasKey( 'username', $properties ); $this->assertArrayHasKey( 'roles', $properties ); - } public function test_get_item_schema_show_avatar() { diff --git a/tests/phpunit/tests/rest-api/wpRestUrlDetailsController.php b/tests/phpunit/tests/rest-api/wpRestUrlDetailsController.php index 24cc517365..d811821052 100644 --- a/tests/phpunit/tests/rest-api/wpRestUrlDetailsController.php +++ b/tests/phpunit/tests/rest-api/wpRestUrlDetailsController.php @@ -284,7 +284,6 @@ class Tests_REST_WpRestUrlDetailsController extends WP_Test_REST_Controller_Test $expected = strtolower( 'Unable to retrieve body from response at this URL' ); $this->assertStringContainsString( $expected, strtolower( $data['message'] ), 'Response "message" does not contain "' . $expected . '"' ); - } /** @@ -382,7 +381,6 @@ class Tests_REST_WpRestUrlDetailsController extends WP_Test_REST_Controller_Test ); return $response; - } ); diff --git a/tests/phpunit/tests/shortcode.php b/tests/phpunit/tests/shortcode.php index 1c19cfb42d..e8aa82c5a8 100644 --- a/tests/phpunit/tests/shortcode.php +++ b/tests/phpunit/tests/shortcode.php @@ -781,7 +781,6 @@ EOF; $js = str_replace( "\'", "'", $matches[1] ); $this->assertSame( $php, $js ); - } /** diff --git a/tests/phpunit/tests/taxonomy.php b/tests/phpunit/tests/taxonomy.php index ce04e22a1b..38770e53e0 100644 --- a/tests/phpunit/tests/taxonomy.php +++ b/tests/phpunit/tests/taxonomy.php @@ -318,7 +318,6 @@ class Tests_Taxonomy extends WP_UnitTestCase { unset( $GLOBALS['wp_taxonomies'][ $tax ] ); _unregister_post_type( $post_type ); - } /** diff --git a/tests/phpunit/tests/term/getTerms.php b/tests/phpunit/tests/term/getTerms.php index 4d05d77192..93ae1f95e8 100644 --- a/tests/phpunit/tests/term/getTerms.php +++ b/tests/phpunit/tests/term/getTerms.php @@ -425,7 +425,6 @@ class Tests_Term_getTerms extends WP_UnitTestCase { ); $this->assertSame( array( $term_id2, $term_id22 ), $terms ); - } /** @@ -801,7 +800,6 @@ class Tests_Term_getTerms extends WP_UnitTestCase { ), $terms ); - } /** @@ -2939,7 +2937,6 @@ class Tests_Term_getTerms extends WP_UnitTestCase { $num_queries = get_num_queries(); $term0 = get_term( $terms[0] ); $this->assertSame( $num_queries, get_num_queries() ); - } /** diff --git a/tests/phpunit/tests/term/wpInsertTerm.php b/tests/phpunit/tests/term/wpInsertTerm.php index a2839d3c45..d99593b1d5 100644 --- a/tests/phpunit/tests/term/wpInsertTerm.php +++ b/tests/phpunit/tests/term/wpInsertTerm.php @@ -146,7 +146,6 @@ class Tests_Term_WpInsertTerm extends WP_UnitTestCase { _unregister_taxonomy( 'wptests_tax' ); $this->assertSame( 'quality', $term->slug ); - } public function test_wp_insert_term_slug_whitespace_string() { @@ -851,7 +850,6 @@ class Tests_Term_WpInsertTerm extends WP_UnitTestCase { $term_2 = get_term( $t2, 'wptests_tax' ); $this->assertSame( $t2, $term_2->term_id ); $this->assertSame( 'Foo', $term_2->name ); - } /** diff --git a/tests/phpunit/tests/term/wpSetObjectTerms.php b/tests/phpunit/tests/term/wpSetObjectTerms.php index 1d9837177b..20631e0599 100644 --- a/tests/phpunit/tests/term/wpSetObjectTerms.php +++ b/tests/phpunit/tests/term/wpSetObjectTerms.php @@ -302,7 +302,6 @@ class Tests_Term_WpSetObjectTerms extends WP_UnitTestCase { // Make sure the term taxonomy ID for 'bar' matches. $this->assertSame( $tt_1[1], $tt_2[0] ); - } /** @@ -346,7 +345,6 @@ class Tests_Term_WpSetObjectTerms extends WP_UnitTestCase { // Make sure the term taxonomy ID for 'bar' matches. $this->assertEquals( $tt_1[1], $tt_2[0] ); - } public function test_should_create_term_that_does_not_exist() { diff --git a/tests/phpunit/tests/term/wpTaxonomy.php b/tests/phpunit/tests/term/wpTaxonomy.php index 8914228dc4..4106e60f3b 100644 --- a/tests/phpunit/tests/term/wpTaxonomy.php +++ b/tests/phpunit/tests/term/wpTaxonomy.php @@ -97,7 +97,6 @@ class Tests_WP_Taxonomy extends WP_UnitTestCase { $this->assertSame( 10, $has_action ); $this->assertFalse( $has_action_after ); - } public function test_applies_registration_args_filters() { diff --git a/tests/phpunit/tests/theme/themeDir.php b/tests/phpunit/tests/theme/themeDir.php index d12377c2d9..e03d7cf06c 100644 --- a/tests/phpunit/tests/theme/themeDir.php +++ b/tests/phpunit/tests/theme/themeDir.php @@ -112,7 +112,6 @@ class Tests_Theme_ThemeDir extends WP_UnitTestCase { $this->assertSame( self::THEME_ROOT . '/sandbox', $theme['Stylesheet Dir'] ); $this->assertSame( 'publish', $theme['Status'] ); $this->assertSame( '', $theme['Parent Theme'] ); - } /** @@ -144,7 +143,6 @@ class Tests_Theme_ThemeDir extends WP_UnitTestCase { $this->assertSame( self::THEME_ROOT . '/stylesheetonly', $theme['Stylesheet Dir'] ); $this->assertSame( 'publish', $theme['Status'] ); $this->assertSame( 'Sandbox', $theme['Parent Theme'] ); - } /** diff --git a/tests/phpunit/tests/theme/wpThemeJson.php b/tests/phpunit/tests/theme/wpThemeJson.php index 698880eab1..cc531ef815 100644 --- a/tests/phpunit/tests/theme/wpThemeJson.php +++ b/tests/phpunit/tests/theme/wpThemeJson.php @@ -765,7 +765,6 @@ class Tests_Theme_wpThemeJson extends WP_UnitTestCase { 'body{--wp--preset--color--grey: grey;--wp--preset--color--dark-grey: grey;--wp--preset--color--light-grey: grey;--wp--preset--color--white-2-black: grey;--wp--custom--white-2-black: value;}', $theme_json->get_stylesheet( array( 'variables' ) ) ); - } /** @@ -3769,7 +3768,6 @@ class Tests_Theme_wpThemeJson extends WP_UnitTestCase { $sanitized_theme_json = $theme_json->get_raw_data(); $this->assertIsArray( $sanitized_theme_json, 'Sanitized theme.json is not an array data type' ); $this->assertArrayNotHasKey( 'styles', $sanitized_theme_json, 'Sanitized theme.json should not have a "styles" key' ); - } /** @@ -4762,7 +4760,6 @@ class Tests_Theme_wpThemeJson extends WP_UnitTestCase { $this->assertEquals( 'var(--wp--preset--font-size--s)', $styles['blocks']['core/quote']['variations']['plain']['typography']['fontSize'], 'Style variations: Assert the originally correct values are still correct.' ); $this->assertEquals( 'var(--wp--preset--color--s)', $styles['blocks']['core/quote']['variations']['plain']['color']['background'], 'Style variations: Assert the internal variables are convert to CSS custom variables.' ); - } public function test_resolve_variables() { diff --git a/tests/phpunit/tests/theme/wpThemeJsonResolver.php b/tests/phpunit/tests/theme/wpThemeJsonResolver.php index 12c9f50f08..d75ff476b3 100644 --- a/tests/phpunit/tests/theme/wpThemeJsonResolver.php +++ b/tests/phpunit/tests/theme/wpThemeJsonResolver.php @@ -846,7 +846,6 @@ class Tests_Theme_wpThemeJsonResolver extends WP_UnitTestCase { $this->assertSame( $block_styles, count( $styles ) === 1, $block_styles_text ); $this->assertSame( $theme_palette, isset( $settings['color']['palette']['theme'] ), $theme_palette_text ); $this->assertSame( $user_palette, isset( $settings['color']['palette']['custom'] ), $user_palette_text ); - } /** diff --git a/tests/phpunit/tests/user.php b/tests/phpunit/tests/user.php index 7157a00cfa..2906469445 100644 --- a/tests/phpunit/tests/user.php +++ b/tests/phpunit/tests/user.php @@ -140,7 +140,6 @@ class Tests_User extends WP_UnitTestCase { // Correct key: deleted. delete_user_meta( self::$author_id, $key, $val ); $this->assertSame( '', get_user_meta( self::$author_id, $key, true ) ); - } /** @@ -1940,7 +1939,6 @@ class Tests_User extends WP_UnitTestCase { // Contains location longitude. $this->assertSame( 'Longitude', $actual['data'][1]['data'][3]['name'] ); $this->assertSame( '-84.5143900', $actual['data'][1]['data'][3]['value'] ); - } /** diff --git a/tests/phpunit/tests/user/capabilities.php b/tests/phpunit/tests/user/capabilities.php index beecfd3b85..27bd085aff 100644 --- a/tests/phpunit/tests/user/capabilities.php +++ b/tests/phpunit/tests/user/capabilities.php @@ -66,7 +66,6 @@ class Tests_User_Capabilities extends WP_UnitTestCase { parent::set_up(); // Keep track of users we create. $this->flush_roles(); - } /** @@ -182,7 +181,6 @@ class Tests_User_Capabilities extends WP_UnitTestCase { 'subscriber' => array( 'subscriber' ), ); - } private function _getMultiSitePrimitiveCaps() { @@ -265,7 +263,6 @@ class Tests_User_Capabilities extends WP_UnitTestCase { 'subscriber' => array( 'subscriber' ), ); - } private function _getSingleSiteMetaCaps() { @@ -453,7 +450,6 @@ class Tests_User_Capabilities extends WP_UnitTestCase { $this->assertSame( array(), $diff, "User with {$role} role has capabilities that aren't being tested" ); } - } /** @@ -747,7 +743,6 @@ class Tests_User_Capabilities extends WP_UnitTestCase { update_option( 'link_manager_enabled', '0' ); $this->assertSame( '0', get_option( 'link_manager_enabled' ) ); - } /** @@ -761,7 +756,6 @@ class Tests_User_Capabilities extends WP_UnitTestCase { $this->assertFalse( $user->has_cap( 'unfiltered_upload' ), "User with the {$role} role should not have the unfiltered_upload capability" ); $this->assertFalse( user_can( $user, 'unfiltered_upload' ), "User with the {$role} role should not have the unfiltered_upload capability" ); } - } /** @@ -917,7 +911,6 @@ class Tests_User_Capabilities extends WP_UnitTestCase { $user->remove_role( 'contributor' ); // User should have one role now. $this->assertSame( array( 'subscriber' ), $user->roles ); - } /** @@ -1037,7 +1030,6 @@ class Tests_User_Capabilities extends WP_UnitTestCase { remove_role( $role_name ); $this->flush_roles(); $this->assertFalse( $wp_roles->is_role( $role_name ) ); - } /** @@ -1082,7 +1074,6 @@ class Tests_User_Capabilities extends WP_UnitTestCase { remove_role( $role_name ); $this->flush_roles(); $this->assertFalse( $wp_roles->is_role( $role_name ) ); - } /** @@ -1121,7 +1112,6 @@ class Tests_User_Capabilities extends WP_UnitTestCase { $this->assertFalse( $user_1->has_cap( $cap ), "User should not have the {$cap} capability" ); } } - } /** @@ -1153,7 +1143,6 @@ class Tests_User_Capabilities extends WP_UnitTestCase { // Check the removed cap on both users. $this->assertFalse( $user_1->has_cap( 'publish_posts' ) ); $this->assertFalse( $user_2->has_cap( 'publish_posts' ) ); - } /** @@ -1217,7 +1206,6 @@ class Tests_User_Capabilities extends WP_UnitTestCase { // User level should be empty. $this->assertEmpty( $user->user_level ); - } /** @@ -1547,7 +1535,6 @@ class Tests_User_Capabilities extends WP_UnitTestCase { "Role: {$role}" ); } - } public function dataTaxonomies() { @@ -1850,7 +1837,6 @@ class Tests_User_Capabilities extends WP_UnitTestCase { // Ensure contributor can't edit, un-trash, or delete the post. $this->assertFalse( user_can( $contributor->ID, 'edit_post', $post->ID ) ); $this->assertFalse( user_can( $contributor->ID, 'delete_post', $post->ID ) ); - } /** @@ -1981,7 +1967,6 @@ class Tests_User_Capabilities extends WP_UnitTestCase { $this->assertFalse( user_can( $contributor->ID, 'edit_post', $author_post->ID ) ); _unregister_post_type( 'page_capability' ); - } public function test_non_logged_in_users_have_no_capabilities() { @@ -2011,7 +1996,6 @@ class Tests_User_Capabilities extends WP_UnitTestCase { wp_logout(); $this->assertSame( 0, get_current_user_id() ); - } /** diff --git a/tests/phpunit/tests/user/countUsers.php b/tests/phpunit/tests/user/countUsers.php index db31ddab75..901ba88f89 100644 --- a/tests/phpunit/tests/user/countUsers.php +++ b/tests/phpunit/tests/user/countUsers.php @@ -64,7 +64,6 @@ class Tests_User_CountUsers extends WP_UnitTestCase { ), $count['avail_roles'] ); - } /** @@ -174,7 +173,6 @@ class Tests_User_CountUsers extends WP_UnitTestCase { ), $count['avail_roles'] ); - } /** @@ -248,7 +246,6 @@ class Tests_User_CountUsers extends WP_UnitTestCase { ), $count['avail_roles'] ); - } /** diff --git a/tests/phpunit/tests/user/getUserCount.php b/tests/phpunit/tests/user/getUserCount.php index 4aee753288..5ec6e481a9 100644 --- a/tests/phpunit/tests/user/getUserCount.php +++ b/tests/phpunit/tests/user/getUserCount.php @@ -81,7 +81,6 @@ class Tests_User_GetUserCount extends WP_UnitTestCase { $count = get_user_count(); $this->assertSame( $start_count + 1, $count ); - } /** diff --git a/tests/phpunit/tests/user/mapMetaCap.php b/tests/phpunit/tests/user/mapMetaCap.php index fb26eca8b5..f8929f0d88 100644 --- a/tests/phpunit/tests/user/mapMetaCap.php +++ b/tests/phpunit/tests/user/mapMetaCap.php @@ -369,7 +369,6 @@ class Tests_User_MapMetaCap extends WP_UnitTestCase { $this->assertSame( array( 'edit_others_posts', 'edit_published_posts' ), map_meta_cap( 'edit_post', $editor, $post_id ) ); $this->assertSame( array( 'delete_others_posts', 'delete_published_posts' ), map_meta_cap( 'delete_post', $editor, $post_id ) ); - } /** diff --git a/tests/phpunit/tests/user/query.php b/tests/phpunit/tests/user/query.php index 4132d1c904..21275738e7 100644 --- a/tests/phpunit/tests/user/query.php +++ b/tests/phpunit/tests/user/query.php @@ -1321,7 +1321,6 @@ class Tests_User_Query extends WP_UnitTestCase { foreach ( $query_vars as $query_var ) { $this->assertArrayHasKey( $query_var, $q->query_vars, "$query_var does not exist." ); } - } public function filter_pre_get_users_args( $q ) { diff --git a/tests/phpunit/tests/user/wpGetUsersWithNoRole.php b/tests/phpunit/tests/user/wpGetUsersWithNoRole.php index d5710aeddf..affe25e72f 100644 --- a/tests/phpunit/tests/user/wpGetUsersWithNoRole.php +++ b/tests/phpunit/tests/user/wpGetUsersWithNoRole.php @@ -42,7 +42,6 @@ class Tests_User_wpGetUsersWithNoRole extends WP_UnitTestCase { ), $users ); - } /** diff --git a/tests/phpunit/tests/utils.php b/tests/phpunit/tests/utils.php index 3146f645c4..6a4f0d45f6 100644 --- a/tests/phpunit/tests/utils.php +++ b/tests/phpunit/tests/utils.php @@ -34,7 +34,6 @@ class Tests_Utils extends WP_UnitTestCase { $expected .= 'foo'; $this->assertSame( $expected, strip_ws( $in ) ); - } /** diff --git a/tests/phpunit/tests/walker.php b/tests/phpunit/tests/walker.php index 31e45963bb..20e0b669c9 100644 --- a/tests/phpunit/tests/walker.php +++ b/tests/phpunit/tests/walker.php @@ -31,7 +31,6 @@ class Tests_Walker extends WP_UnitTestCase { $this->assertSame( 1, $this->walker->get_number_of_root_elements( $items ) ); $this->assertSame( '
  • 1
  • ', $output ); - } public function test_single_item_flat() { @@ -46,7 +45,6 @@ class Tests_Walker extends WP_UnitTestCase { $this->assertSame( 1, $this->walker->get_number_of_root_elements( $items ) ); $this->assertSame( '
  • 1
  • ', $output ); - } public function test_single_item_depth_1() { @@ -61,7 +59,6 @@ class Tests_Walker extends WP_UnitTestCase { $this->assertSame( 1, $this->walker->get_number_of_root_elements( $items ) ); $this->assertSame( '
  • 1
  • ', $output ); - } public function test_multiple_items_single_level() { @@ -81,7 +78,6 @@ class Tests_Walker extends WP_UnitTestCase { $this->assertSame( 2, $this->walker->get_number_of_root_elements( $items ) ); $this->assertSame( '
  • 1
  • 2
  • ', $output ); - } public function test_multiple_items_multiple_levels() { @@ -101,7 +97,6 @@ class Tests_Walker extends WP_UnitTestCase { $this->assertSame( 1, $this->walker->get_number_of_root_elements( $items ) ); $this->assertSame( '
  • 1
    • 2
  • ', $output ); - } public function test_multiple_items_multiple_levels_flat() { @@ -121,7 +116,6 @@ class Tests_Walker extends WP_UnitTestCase { $this->assertSame( 1, $this->walker->get_number_of_root_elements( $items ) ); $this->assertSame( '
  • 1
  • 2
  • ', $output ); - } public function test_multiple_items_multiple_levels_depth_1() { @@ -141,7 +135,6 @@ class Tests_Walker extends WP_UnitTestCase { $this->assertSame( 1, $this->walker->get_number_of_root_elements( $items ) ); $this->assertSame( '
  • 1
  • ', $output ); - } public function test_multiple_items_multiple_levels_depth_2() { @@ -165,7 +158,6 @@ class Tests_Walker extends WP_UnitTestCase { $this->assertSame( 1, $this->walker->get_number_of_root_elements( $items ) ); $this->assertSame( '
  • 1
    • 2
  • ', $output ); - } public function test_multiple_items_recursive() { @@ -185,7 +177,6 @@ class Tests_Walker extends WP_UnitTestCase { $this->assertSame( 0, $this->walker->get_number_of_root_elements( $items ) ); $this->assertSame( '
  • 1
    • 2
  • ', $output ); - } public function test_single_item_child() { @@ -201,7 +192,6 @@ class Tests_Walker extends WP_UnitTestCase { $this->assertSame( 0, $this->walker->get_number_of_root_elements( $items ) ); $this->assertSame( '
  • 1
  • ', $output ); - } public function test_single_item_missing_parent_depth_1() { @@ -224,7 +214,6 @@ class Tests_Walker extends WP_UnitTestCase { // But as we've only asked for the first depth maybe nothing should be returned? // $this->assertSame( '', $output ); - } public function test_multiple_items_missing_parents() { @@ -248,7 +237,6 @@ class Tests_Walker extends WP_UnitTestCase { $this->assertSame( 0, $this->walker->get_number_of_root_elements( $items ) ); $this->assertSame( '
  • 4
  • 5
  • 6
  • ', $output ); - } public function test_multiple_items_missing_parents_depth_1() { @@ -282,7 +270,6 @@ class Tests_Walker extends WP_UnitTestCase { // Or maybe all items which are missing parents should simply be treat top level? // $this->assertSame( '
  • 4
  • 5
  • 6
  • ', $output ); - } /** @@ -312,7 +299,6 @@ class Tests_Walker extends WP_UnitTestCase { $output = $this->walker->paged_walk( $items, 0, 2, 1 ); $this->assertSame( '
  • 2
  • ', $output ); - } } diff --git a/tests/phpunit/tests/widgets.php b/tests/phpunit/tests/widgets.php index 8f64669c29..fd3826ec3d 100644 --- a/tests/phpunit/tests/widgets.php +++ b/tests/phpunit/tests/widgets.php @@ -135,7 +135,6 @@ class Tests_Widgets extends WP_UnitTestCase { register_sidebars( 1, array( 'id' => 'wp-unit-test' ) ); $this->assertArrayHasKey( 'wp-unit-test', $wp_registered_sidebars ); - } /** @@ -157,7 +156,6 @@ class Tests_Widgets extends WP_UnitTestCase { } $this->assertCount( $num, $result ); - } /** @@ -266,7 +264,6 @@ class Tests_Widgets extends WP_UnitTestCase { $this->assertArrayHasKey( $sidebar_id, $wp_registered_sidebars ); $this->assertStringContainsString( '
    ', $wp_registered_sidebars[ $sidebar_id ]['before_sidebar'] ); $this->assertStringContainsString( '
    ', $wp_registered_sidebars[ $sidebar_id ]['after_sidebar'] ); - } /** @@ -286,7 +283,6 @@ class Tests_Widgets extends WP_UnitTestCase { $this->assertArrayHasKey( $sidebar_id, $wp_registered_sidebars ); $this->assertEmpty( $wp_registered_sidebars[ $sidebar_id ]['before_sidebar'] ); $this->assertEmpty( $wp_registered_sidebars[ $sidebar_id ]['after_sidebar'] ); - } /** @@ -890,7 +886,6 @@ class Tests_Widgets extends WP_UnitTestCase { unregister_widget( 'WP_Widget_Text' ); $this->assertMatchesRegularExpression( '//', $actual ); - } /** diff --git a/tests/phpunit/tests/xmlrpc/basic.php b/tests/phpunit/tests/xmlrpc/basic.php index a754fdbb63..a56a721a07 100644 --- a/tests/phpunit/tests/xmlrpc/basic.php +++ b/tests/phpunit/tests/xmlrpc/basic.php @@ -93,7 +93,6 @@ class Tests_XMLRPC_Basic extends WP_XMLRPC_UnitTestCase { $this->assertArrayNotHasKey( 'faultCode', $result[0] ); $this->assertArrayHasKey( 'faultCode', $result[1] ); $this->assertArrayHasKey( 'faultCode', $result[2] ); - } /**