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
This commit is contained in:
Sergey Biryukov 2023-09-08 10:01:14 +00:00
parent d790be16dc
commit 1118e37f48
123 changed files with 0 additions and 263 deletions

View File

@ -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 );
}
/**

View File

@ -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';
}
}
/**

View File

@ -284,7 +284,6 @@ function wp_dashboard() {
<?php
wp_nonce_field( 'closedpostboxes', 'closedpostboxesnonce', false );
wp_nonce_field( 'meta-box-order', 'meta-box-order-nonce', false );
}
//

View File

@ -953,7 +953,6 @@ function wp_read_image_metadata( $file ) {
* @param array $exif EXIF data.
*/
return apply_filters( 'wp_read_image_metadata', $meta, $file, $image_type, $iptc, $exif );
}
/**

View File

@ -1320,7 +1320,6 @@ function wp_get_nav_menu_to_edit( $menu_id = 0 ) {
} elseif ( is_wp_error( $menu ) ) {
return $menu;
}
}
/**

View File

@ -161,7 +161,6 @@ function wp_get_revision_ui_diff( $post, $compare_from, $compare_to ) {
* @param WP_Post $compare_to The revision post to compare to.
*/
return apply_filters( 'wp_get_revision_ui_diff', $return, $compare_from, $compare_to );
}
/**

View File

@ -1451,7 +1451,6 @@ function do_meta_boxes( $screen, $context, $data_object ) {
echo '</div>';
return $i;
}
/**

View File

@ -243,7 +243,6 @@ function display_themes() {
}
$wp_list_table->prepare_items();
$wp_list_table->display();
}
/**

View File

@ -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() {
)
);
}
}
/**

View File

@ -191,7 +191,6 @@ function list_core_update( $update ) {
}
echo '</form>';
}
/**

View File

@ -147,7 +147,6 @@ class Twenty_Eleven_Ephemera_Widget extends WP_Widget {
if ( ! is_customize_preview() ) {
wp_cache_set( 'widget_twentyeleven_ephemera', $cache, 'widget' );
}
}
/**

View File

@ -207,7 +207,6 @@ function twentynineteen_widgets_init() {
'after_title' => '</h2>',
)
);
}
add_action( 'widgets_init', 'twentynineteen_widgets_init' );

View File

@ -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 );
}
}
}

View File

@ -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' );

View File

@ -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();
}
}

View File

@ -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 );
}

View File

@ -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 '<div class="post-meta-wrapper post-meta-edit-link-wrapper"><ul class="post-meta"><li class="post-edit meta-wrapper"><span class="meta-icon">' . twentytwenty_get_theme_svg( 'edit' ) . '</span><span class="meta-text"><a href="' . esc_url( $edit_url ) . '">' . $text . '</a></span></li></ul><!-- .post-meta --></div><!-- .post-meta-wrapper -->';
}
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() {
?>
<script>document.documentElement.className = document.documentElement.className.replace( 'no-js', 'js' );</script>
<?php
}
add_action( 'wp_head', 'twentytwenty_no_js_class' );
@ -762,7 +753,6 @@ function twentytwenty_body_classes( $classes ) {
}
return $classes;
}
add_filter( 'body_class', 'twentytwenty_body_classes' );
@ -803,7 +793,6 @@ function twentytwenty_get_the_archive_title( $title ) {
}
return preg_replace( $regex['pattern'], $regex['replacement'], $title );
}
add_filter( 'get_the_archive_title', 'twentytwenty_get_the_archive_title' );

View File

@ -136,7 +136,6 @@ if ( function_exists( 'register_block_pattern' ) ) {
'content' => '<!-- wp:columns {"align":"wide"} --><div class="wp-block-columns alignwide"><!-- wp:column --><div class="wp-block-column"><!-- wp:paragraph --><p><a href="mailto:#">' . esc_html_x( 'example@example.com', 'Block pattern sample content', 'twentytwentyone' ) . '<br></a>' . esc_html_x( '123-456-7890', 'Block pattern sample content', 'twentytwentyone' ) . '</p><!-- /wp:paragraph --></div><!-- /wp:column --><!-- wp:column --><div class="wp-block-column"><!-- wp:paragraph {"align":"center"} --><p class="has-text-align-center">' . esc_html_x( '123 Main Street', 'Block pattern sample content', 'twentytwentyone' ) . '<br>' . esc_html_x( 'Cambridge, MA, 02139', 'Block pattern sample content', 'twentytwentyone' ) . '</p><!-- /wp:paragraph --></div><!-- /wp:column --><!-- wp:column {"verticalAlignment":"center"} --><div class="wp-block-column is-vertically-aligned-center"><!-- wp:social-links {"align":"right","className":"is-style-twentytwentyone-social-icons-color"} --><ul class="wp-block-social-links alignright is-style-twentytwentyone-social-icons-color"><!-- wp:social-link {"url":"https://wordpress.org","service":"wordpress"} /--><!-- wp:social-link {"url":"https://www.facebook.com/WordPress/","service":"facebook"} /--><!-- wp:social-link {"url":"https://twitter.com/WordPress","service":"twitter"} /--><!-- wp:social-link {"url":"https://www.youtube.com/wordpress","service":"youtube"} /--></ul><!-- /wp:social-links --></div><!-- /wp:column --></div><!-- /wp:columns -->',
)
);
}
add_action( 'init', 'twenty_twenty_one_register_block_pattern' );
}

View File

@ -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;

View File

@ -1100,7 +1100,6 @@ function wp_admin_bar_appearance_menu( $wp_admin_bar ) {
)
);
}
}
/**

View File

@ -150,7 +150,6 @@ class Walker_Comment extends Walker {
unset( $children_elements[ $id ] );
}
}
/**

View File

@ -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.
}
}
/**

View File

@ -118,7 +118,6 @@ class WP_Text_Diff_Renderer_Table extends Text_Diff_Renderer {
/* translators: Hidden accessibility text. */
__( 'Added:' ) .
" </span>{$line}</td>";
}
/**

View File

@ -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 );
}
}
/**

View File

@ -62,7 +62,6 @@ class WP_Customize_Header_Image_Control extends WP_Customize_Image_Control {
'get_url' => 'get_header_image',
)
);
}
/**

View File

@ -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 {
}
}
}
}
/**

View File

@ -429,5 +429,4 @@ function wp_templating_constants() {
if ( ! defined( 'WP_DEFAULT_THEME' ) ) {
define( 'WP_DEFAULT_THEME', 'twentytwentythree' );
}
}

View File

@ -4829,7 +4829,6 @@ function smilies_init() {
}
$wp_smiliessearch .= ')(?=' . $spaces . '|$)/m';
}
/**
@ -5609,7 +5608,6 @@ function _deprecated_constructor( $class_name, $version, $parent_class = '' ) {
}
}
}
}
/**

View File

@ -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',
)
);
}
/**

View File

@ -2718,7 +2718,6 @@ function get_posts_nav_link( $args = array() ) {
}
}
return $return;
}
/**

View File

@ -1865,7 +1865,6 @@ function wp_is_jsonp_request() {
$jsonp_enabled = apply_filters( 'rest_jsonp_enabled', true );
return $jsonp_enabled;
}
/**

View File

@ -111,7 +111,6 @@ if ( ! class_exists( 'Translation_Entry', false ) ) :
if ( $this->extracted_comments !== $other->extracted_comments ) {
$this->extracted_comments .= $other->extracted_comments;
}
}
}
endif;

View File

@ -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;
}
/**

View File

@ -131,7 +131,6 @@ class WP_REST_Autosaves_Controller extends WP_REST_Revisions_Controller {
'schema' => array( $this, 'get_public_item_schema' ),
)
);
}
/**

View File

@ -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 );
}
}
/**

View File

@ -128,7 +128,6 @@ class WP_REST_Revisions_Controller extends WP_REST_Controller {
'schema' => array( $this, 'get_public_item_schema' ),
)
);
}
/**

View File

@ -54,7 +54,6 @@ class WP_REST_Settings_Controller extends WP_REST_Controller {
'schema' => array( $this, 'get_public_item_schema' ),
)
);
}
/**

View File

@ -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' );
}
}
/**

View File

@ -73,7 +73,6 @@ class WP_Filesystem_MockFS extends WP_Filesystem_Base {
$this->put_contents( $path, 'This is a test file' );
}
}
}
/**

View File

@ -61,7 +61,6 @@ if ( class_exists( 'WP_Image_Editor' ) ) :
return self::$save_return;
}
public function stream( $mime_type = null ) {
}
public function get_size() {

View File

@ -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 ) {

View File

@ -56,7 +56,6 @@ class WPProfiler {
'filters' => array(),
'queries' => array(),
);
}
public function stop() {

View File

@ -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' ) ) );
}
/**

View File

@ -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'] );
}
/**

View File

@ -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 ) );
}
}

View File

@ -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 ) );
}
}

View File

@ -34,6 +34,5 @@ class Tests_Category_GetCategoryBySlug extends WP_UnitTestCase {
// Validate unknown category returns false.
$this->assertFalse( get_category_by_slug( 'testcat3' ) );
}
}

View File

@ -1012,7 +1012,6 @@ class Tests_Comment extends WP_UnitTestCase {
),
$this->preprocess_comment_data
);
}
public function filter_preprocess_comment( $commentdata ) {

View File

@ -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() {

View File

@ -55,7 +55,6 @@ class Tests_Comment_GetCommentLink extends WP_UnitTestCase {
'comment_date_gmt' => gmdate( 'Y-m-d H:i:s', $now - 600 ),
)
);
}
/**

View File

@ -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 );
}
/**

View File

@ -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() );
}
/**

View File

@ -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( '<script', $comment->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( '<script', $comment->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( '<script', $comment->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( '<script', $comment->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( '<script', $comment->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
);
}
/**

View File

@ -32,7 +32,6 @@ class Tests_Compat_arrayKeyFirst extends WP_UnitTestCase {
array_key_first( $arr )
);
}
}
/**

View File

@ -34,7 +34,6 @@ class Tests_Compat_strContains extends WP_UnitTestCase {
str_contains( $haystack, $needle )
);
}
}
/**

View File

@ -34,7 +34,6 @@ class Tests_Compat_StrEndsWith extends WP_UnitTestCase {
str_ends_with( $haystack, $needle )
);
}
}
/**

View File

@ -34,7 +34,6 @@ class Tests_Compat_StrStartsWith extends WP_UnitTestCase {
str_starts_with( $haystack, $needle )
);
}
}
/**

View File

@ -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() );
}
/**

View File

@ -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' ) );
}
/**

View File

@ -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 ) ) );
}
}
/**

View File

@ -311,7 +311,6 @@ class Tests_DB_dbDelta extends WP_UnitTestCase {
);
$this->assertTableRowHasValue( 'column_1', 'wcphilly2015', $wpdb->prefix . 'dbdelta_test' );
}
/**

View File

@ -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() {

View File

@ -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' ) );
}
/**

View File

@ -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() {

View File

@ -56,7 +56,6 @@ class Tests_Feed_Atom extends WP_UnitTestCase {
// Assign a tagline option.
update_option( 'blogdescription', 'Just another WordPress site' );
}
/**

View File

@ -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' ),
);
}
/**

View File

@ -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 );
}
/**

View File

@ -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 );
}
/**

View File

@ -151,7 +151,6 @@ class Tests_Formatting_EscUrl extends WP_UnitTestCase {
)
)
);
}
/**

View File

@ -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() {

View File

@ -32,7 +32,6 @@ class Tests_Formatting_wpTexturize extends WP_UnitTestCase {
$invalid_nest = '<pre></code>"baba"</pre>';
$this->assertSame( $invalid_nest, wptexturize( $invalid_nest ) );
}
/**

View File

@ -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() {

View File

@ -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 ) );
}
/**

View File

@ -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 ) );
}
/**

View File

@ -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() {

View File

@ -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() {

View File

@ -129,7 +129,6 @@ class Tests_Link_ThemeFile extends WP_UnitTestCase {
} else {
$this->assertFileDoesNotExist( WP_CONTENT_DIR . "/themes/theme-file-parent/{$file}" );
}
}
/**

View File

@ -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 ) );
}
}
/**

View File

@ -870,7 +870,6 @@ BLOB;
),
$galleries
);
}
/**
@ -937,7 +936,6 @@ BLOB;
),
$galleries
);
}
/**

View File

@ -243,6 +243,5 @@ class Tests_Menu_wpNavMenu extends WP_UnitTestCase {
$menu_html,
'The level zero menu item should appear in the menu.'
);
}
}

View File

@ -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 );
}
/**

View File

@ -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 );
}
/**

View File

@ -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;
}
/**

View File

@ -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() {

View File

@ -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() {

View File

@ -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' ) );
}
/**

View File

@ -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 ) );
}
/**

View File

@ -57,7 +57,6 @@ class Tests_Post_Nav_Menu extends WP_UnitTestCase {
// After falling back, the markup should not include whitespace around <li>'s.
$this->assertDoesNotMatchRegularExpression( '/\s<li.*>|<\/li>\s/U', $menu );
$this->assertMatchesRegularExpression( '/><li.*>|<\/li></U', $menu );
}
/**
@ -215,7 +214,6 @@ class Tests_Post_Nav_Menu extends WP_UnitTestCase {
$custom_item = wp_filter_object_list( $menu_items, array( 'db_id' => $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 );
}
/**

View File

@ -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 ) );
}
/**

View File

@ -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(

View File

@ -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]',

View File

@ -1920,7 +1920,6 @@ class Tests_Query_MetaQuery extends WP_UnitTestCase {
);
$this->assertSameSets( array( $posts[0] ), $q->posts );
}
/**

View File

@ -768,7 +768,6 @@ class Tests_Query_Results extends WP_UnitTestCase {
$this->assertIsInt( $post->ID );
$this->assertIsInt( $post->post_parent );
}
}
/**

View File

@ -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'] );
}
/**

View File

@ -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() {

View File

@ -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 );
}
/**

View File

@ -362,7 +362,6 @@ class WP_Test_REST_Controller extends WP_Test_REST_TestCase {
// Ignored properties.
$this->assertArrayNotHasKey( 'ignored_prop', $args['someobject'] );
}
/**

View File

@ -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.' );
}
/**

View File

@ -653,7 +653,6 @@ class WP_REST_Pattern_Directory_Controller_Test extends WP_Test_REST_Controller_
} else {
$this->assertNotSame( $result_1, $result_2, $message );
}
}
/**

View File

@ -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 );
}
/**

Some files were not shown because too many files have changed in this diff Show More