Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tests/phpunit/includes/testcase-rest-controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public function set_up() {
}

public function tear_down() {
remove_filter( 'rest_url', array( $this, 'test_rest_url_for_leading_slash' ), 10, 2 );
remove_filter( 'rest_url', array( $this, 'test_rest_url_for_leading_slash' ) );
/** @var WP_REST_Server $wp_rest_server */
global $wp_rest_server;
$wp_rest_server = null;
Expand Down
4 changes: 2 additions & 2 deletions tests/phpunit/includes/utils.php
Original file line number Diff line number Diff line change
Expand Up @@ -617,8 +617,8 @@ function _cleanup_query_vars() {
}

function _clean_term_filters() {
remove_filter( 'get_terms', array( 'Featured_Content', 'hide_featured_term' ), 10, 2 );
remove_filter( 'get_the_terms', array( 'Featured_Content', 'hide_the_featured_term' ), 10, 3 );
remove_filter( 'get_terms', array( 'Featured_Content', 'hide_featured_term' ) );
remove_filter( 'get_the_terms', array( 'Featured_Content', 'hide_the_featured_term' ) );
}

/**
Expand Down
4 changes: 2 additions & 2 deletions tests/phpunit/tests/actions.php
Original file line number Diff line number Diff line change
Expand Up @@ -620,7 +620,7 @@ public function test_action_callback_manipulation_while_running() {
}

public function action_that_manipulates_a_running_hook( $hook_name, $mocks ) {
remove_action( $hook_name, array( $mocks[1], 'action' ), 12, 2 );
remove_action( $hook_name, array( $mocks[1], 'action' ), 12 );
add_action( $hook_name, array( $mocks[2], 'action' ), 12, 2 );
add_action( $hook_name, array( $mocks[3], 'action' ), 13, 2 );
add_action( $hook_name, array( $mocks[4], 'action' ), 10, 2 );
Expand Down Expand Up @@ -836,7 +836,7 @@ public function test_do_action_deprecated_with_multiple_params() {

add_action( 'tests_do_action_deprecated', array( __CLASS__, 'deprecated_action_callback_multiple_params' ), 10, 2 );
do_action_deprecated( 'tests_do_action_deprecated', array( $p1, $p2 ), '4.6.0' );
remove_action( 'tests_do_action_deprecated', array( __CLASS__, 'deprecated_action_callback_multiple_params' ), 10, 2 );
remove_action( 'tests_do_action_deprecated', array( __CLASS__, 'deprecated_action_callback_multiple_params' ) );

$this->assertSame( 'Bar1', $p1->post_title );
$this->assertSame( 'Bar2', $p2->post_title );
Expand Down
2 changes: 1 addition & 1 deletion tests/phpunit/tests/ajax/wpAjaxResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public function set_up() {
* Remove the wp_die() override, restore error reporting
*/
public function tear_down() {
remove_filter( 'wp_die_ajax_handler', array( $this, 'getDieHandler' ), 1, 1 );
remove_filter( 'wp_die_ajax_handler', array( $this, 'getDieHandler' ), 1 );
error_reporting( $this->_error_level );
parent::tear_down();
}
Expand Down
2 changes: 1 addition & 1 deletion tests/phpunit/tests/comment.php
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ public function test_wp_update_comment_is_wp_error() {
true
);

remove_filter( 'wp_update_comment_data', array( $this, 'wp_update_comment_data_filter' ), 10, 3 );
remove_filter( 'wp_update_comment_data', array( $this, 'wp_update_comment_data_filter' ) );

$this->assertWPError( $result );
}
Expand Down
2 changes: 1 addition & 1 deletion tests/phpunit/tests/comment/query.php
Original file line number Diff line number Diff line change
Expand Up @@ -5220,7 +5220,7 @@ public function test_comments_pre_query_filter_should_bypass_database_query() {
$q = new WP_Comment_Query();
$results = $q->query( array() );

remove_filter( 'comments_pre_query', array( __CLASS__, 'filter_comments_pre_query' ), 10, 2 );
remove_filter( 'comments_pre_query', array( __CLASS__, 'filter_comments_pre_query' ) );

// Make sure no queries were executed.
$this->assertSame( $num_queries, get_num_queries() );
Expand Down
2 changes: 1 addition & 1 deletion tests/phpunit/tests/comment/template.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ public function test_get_comments_number_text_declension_with_custom_args( $numb

$this->assertSame( $output, get_comments_number_text( false, false, $input ) );

remove_filter( 'gettext_with_context', array( $this, 'enable_comment_number_declension' ), 10, 4 );
remove_filter( 'gettext_with_context', array( $this, 'enable_comment_number_declension' ) );
}

public function enable_comment_number_declension( $translation, $text, $context, $domain ) {
Expand Down
2 changes: 1 addition & 1 deletion tests/phpunit/tests/filters.php
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,7 @@ public function test_apply_filters_deprecated_with_multiple_params() {

add_filter( 'tests_apply_filters_deprecated', array( __CLASS__, 'deprecated_filter_callback_multiple_params' ), 10, 2 );
$p1 = apply_filters_deprecated( 'tests_apply_filters_deprecated', array( $p1, $p2 ), '4.6.0' );
remove_filter( 'tests_apply_filters_deprecated', array( __CLASS__, 'deprecated_filter_callback_multiple_params' ), 10, 2 );
remove_filter( 'tests_apply_filters_deprecated', array( __CLASS__, 'deprecated_filter_callback_multiple_params' ) );

$this->assertSame( 'Bar1', $p1 );

Expand Down
6 changes: 3 additions & 3 deletions tests/phpunit/tests/formatting/wpTexturize.php
Original file line number Diff line number Diff line change
Expand Up @@ -1571,7 +1571,7 @@ public function test_translate( $input, $output ) {

$result = wptexturize( $input, true );

remove_filter( 'gettext_with_context', array( $this, 'filter_translate' ), 10, 4 );
remove_filter( 'gettext_with_context', array( $this, 'filter_translate' ) );
wptexturize( 'reset', true );

$this->assertSame( $output, $result );
Expand Down Expand Up @@ -1849,7 +1849,7 @@ public function test_unregistered_shortcodes( $input, $output ) {

$output = $this->assertSame( $output, wptexturize( $input ) );

remove_filter( 'no_texturize_shortcodes', array( $this, 'filter_shortcodes' ), 10, 1 );
remove_filter( 'no_texturize_shortcodes', array( $this, 'filter_shortcodes' ) );
return $output;
}

Expand Down Expand Up @@ -1996,7 +1996,7 @@ public function test_primes_quotes_translation( $input, $output ) {

$result = wptexturize( $input, true );

remove_filter( 'gettext_with_context', array( $this, 'filter_translate2' ), 10, 4 );
remove_filter( 'gettext_with_context', array( $this, 'filter_translate2' ) );
wptexturize( 'reset', true );

$this->assertSame( $output, $result );
Expand Down
2 changes: 1 addition & 1 deletion tests/phpunit/tests/media.php
Original file line number Diff line number Diff line change
Expand Up @@ -6255,7 +6255,7 @@ public function test_wp_editor_set_quality_includes_dimensions() {
wp_generate_attachment_metadata( $attachment_id, $file );

// Clean up the filter.
remove_filter( 'wp_editor_set_quality', array( $this, 'assert_dimensions_in_wp_editor_set_quality' ), 10, 3 );
remove_filter( 'wp_editor_set_quality', array( $this, 'assert_dimensions_in_wp_editor_set_quality' ) );
}

/**
Expand Down
4 changes: 2 additions & 2 deletions tests/phpunit/tests/multisite/site.php
Original file line number Diff line number Diff line change
Expand Up @@ -661,7 +661,7 @@ public function test_invalid_domain_does_not_exist_with_default_site_id() {
public function test_domain_filtered_to_exist() {
add_filter( 'domain_exists', array( $this, 'domain_exists_cb' ), 10, 4 );
$exists = domain_exists( 'foo', 'bar' );
remove_filter( 'domain_exists', array( $this, 'domain_exists_cb' ), 10, 4 );
remove_filter( 'domain_exists', array( $this, 'domain_exists_cb' ) );
$this->assertSame( 1234, $exists );
}

Expand All @@ -673,7 +673,7 @@ public function test_slashed_path_in_domain_exists() {
add_filter( 'domain_exists', array( $this, 'domain_exists_cb' ), 10, 4 );
$exists1 = domain_exists( 'foo', 'bar' );
$exists2 = domain_exists( 'foo', 'bar/' );
remove_filter( 'domain_exists', array( $this, 'domain_exists_cb' ), 10, 4 );
remove_filter( 'domain_exists', array( $this, 'domain_exists_cb' ) );

// Make sure the same result is returned with or without a trailing slash.
$this->assertSame( $exists1, $exists2 );
Expand Down
2 changes: 1 addition & 1 deletion tests/phpunit/tests/multisite/wpNetworkQuery.php
Original file line number Diff line number Diff line change
Expand Up @@ -568,7 +568,7 @@ public function test_networks_pre_query_filter_should_bypass_database_query() {
$q = new WP_Network_Query();
$results = $q->query( array() );

remove_filter( 'networks_pre_query', array( __CLASS__, 'filter_networks_pre_query' ), 10, 2 );
remove_filter( 'networks_pre_query', array( __CLASS__, 'filter_networks_pre_query' ) );

// Make sure no queries were executed.
$this->assertSame( $num_queries, get_num_queries() );
Expand Down
2 changes: 1 addition & 1 deletion tests/phpunit/tests/multisite/wpSiteQuery.php
Original file line number Diff line number Diff line change
Expand Up @@ -1122,7 +1122,7 @@ public function test_sites_pre_query_filter_should_bypass_database_query() {
$q = new WP_Site_Query();
$results = $q->query( array() );

remove_filter( 'sites_pre_query', array( __CLASS__, 'filter_sites_pre_query' ), 10, 2 );
remove_filter( 'sites_pre_query', array( __CLASS__, 'filter_sites_pre_query' ) );

// Make sure no queries were executed.
$this->assertSame( $num_queries, get_num_queries() );
Expand Down
2 changes: 1 addition & 1 deletion tests/phpunit/tests/post.php
Original file line number Diff line number Diff line change
Expand Up @@ -522,7 +522,7 @@ public function test_pre_wp_unique_post_slug_filter() {
$post = get_post( $post_id );
$this->assertSame( 'override-slug-' . $post->post_type, $post->post_name );

remove_filter( 'pre_wp_unique_post_slug', array( $this, 'filter_pre_wp_unique_post_slug' ), 10, 6 );
remove_filter( 'pre_wp_unique_post_slug', array( $this, 'filter_pre_wp_unique_post_slug' ) );
}

public function filter_pre_wp_unique_post_slug( $override_slug, $slug, $post_id, $post_status, $post_type, $post_parent ) {
Expand Down
2 changes: 1 addition & 1 deletion tests/phpunit/tests/post/attachments.php
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ public function test_wp_attachment_is_default() {
$this->assertFalse( wp_attachment_is( 'video', $attachment_id ) );

if ( is_multisite() ) {
remove_filter( 'upload_mimes', array( $this, 'allow_psd_mime_type' ), 10, 2 );
remove_filter( 'upload_mimes', array( $this, 'allow_psd_mime_type' ) );
}
}

Expand Down
16 changes: 8 additions & 8 deletions tests/phpunit/tests/post/nav-menu.php
Original file line number Diff line number Diff line change
Expand Up @@ -748,19 +748,19 @@ public function test_wp_nav_menu_filters_are_passed_args_object() {
* Remove test filters.
*/
// In function.
remove_filter( 'pre_wp_nav_menu', array( $this, 'confirm_second_param_args_object' ), 10, 2 );
remove_filter( 'wp_nav_menu_objects', array( $this, 'confirm_second_param_args_object' ), 10, 2 );
remove_filter( 'wp_nav_menu_items', array( $this, 'confirm_second_param_args_object' ), 10, 2 );
remove_filter( 'pre_wp_nav_menu', array( $this, 'confirm_second_param_args_object' ) );
remove_filter( 'wp_nav_menu_objects', array( $this, 'confirm_second_param_args_object' ) );
remove_filter( 'wp_nav_menu_items', array( $this, 'confirm_second_param_args_object' ) );

// In walker.
remove_filter( 'nav_menu_item_args', array( $this, 'confirm_nav_menu_item_args_object' ) );

remove_filter( 'nav_menu_css_class', array( $this, 'confirm_third_param_args_object' ), 10, 3 );
remove_filter( 'nav_menu_item_id', array( $this, 'confirm_third_param_args_object' ), 10, 3 );
remove_filter( 'nav_menu_link_attributes', array( $this, 'confirm_third_param_args_object' ), 10, 3 );
remove_filter( 'nav_menu_item_title', array( $this, 'confirm_third_param_args_object' ), 10, 3 );
remove_filter( 'nav_menu_css_class', array( $this, 'confirm_third_param_args_object' ) );
remove_filter( 'nav_menu_item_id', array( $this, 'confirm_third_param_args_object' ) );
remove_filter( 'nav_menu_link_attributes', array( $this, 'confirm_third_param_args_object' ) );
remove_filter( 'nav_menu_item_title', array( $this, 'confirm_third_param_args_object' ) );

remove_filter( 'walker_nav_menu_start_el', array( $this, 'confirm_forth_param_args_object' ), 10, 4 );
remove_filter( 'walker_nav_menu_start_el', array( $this, 'confirm_forth_param_args_object' ) );
}

/**
Expand Down
2 changes: 1 addition & 1 deletion tests/phpunit/tests/post/wpInsertPost.php
Original file line number Diff line number Diff line change
Expand Up @@ -1350,7 +1350,7 @@ public function test_wp_untrash_post_status_filter_restores_post_to_correct_stat
wp_trash_post( $page_id );
wp_untrash_post( $page_id );

remove_filter( 'wp_untrash_post_status', 'wp_untrash_post_set_previous_status', 10, 3 );
remove_filter( 'wp_untrash_post_status', 'wp_untrash_post_set_previous_status' );

$this->assertSame( $post_status, get_post( $page_id )->post_status );
}
Expand Down
4 changes: 2 additions & 2 deletions tests/phpunit/tests/rest-api/rest-comments-controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -2283,7 +2283,7 @@ public function test_allow_anonymous_comments_null() {

$response = rest_get_server()->dispatch( $request );

remove_filter( 'rest_allow_anonymous_comments', array( $this, 'anonymous_comments_callback_null' ), 10, 2 );
remove_filter( 'rest_allow_anonymous_comments', array( $this, 'anonymous_comments_callback_null' ) );

$this->assertErrorResponse( 'rest_comment_login_required', $response, 401 );
}
Expand Down Expand Up @@ -3024,7 +3024,7 @@ public function test_update_comment_is_wp_error() {
$request->set_body( wp_json_encode( $params ) );
$response = rest_get_server()->dispatch( $request );

remove_filter( 'wp_update_comment_data', array( $this, '_wp_update_comment_data_filter' ), 10, 3 );
remove_filter( 'wp_update_comment_data', array( $this, '_wp_update_comment_data_filter' ) );

$this->assertErrorResponse( 'rest_comment_failed_edit', $response, 500 );
}
Expand Down
4 changes: 2 additions & 2 deletions tests/phpunit/tests/rest-api/rest-posts-controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -3720,7 +3720,7 @@ public function test_create_post_with_categories_that_cannot_be_assigned_by_curr

add_filter( 'map_meta_cap', array( $this, 'revoke_assign_term' ), 10, 4 );
$response = rest_get_server()->dispatch( $request );
remove_filter( 'map_meta_cap', array( $this, 'revoke_assign_term' ), 10, 4 );
remove_filter( 'map_meta_cap', array( $this, 'revoke_assign_term' ) );

$this->assertErrorResponse( 'rest_cannot_assign_term', $response, 403 );
}
Expand Down Expand Up @@ -4454,7 +4454,7 @@ public function test_update_post_with_categories_that_cannot_be_assigned_by_curr

add_filter( 'map_meta_cap', array( $this, 'revoke_assign_term' ), 10, 4 );
$response = rest_get_server()->dispatch( $request );
remove_filter( 'map_meta_cap', array( $this, 'revoke_assign_term' ), 10, 4 );
remove_filter( 'map_meta_cap', array( $this, 'revoke_assign_term' ) );

$this->assertErrorResponse( 'rest_cannot_assign_term', $response, 403 );
}
Expand Down
8 changes: 4 additions & 4 deletions tests/phpunit/tests/rest-api/rest-tags-controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -988,7 +988,7 @@ public function test_update_item_with_edit_term_cap_granted() {

add_filter( 'map_meta_cap', array( $this, 'grant_edit_term' ), 10, 2 );
$response = rest_get_server()->dispatch( $request );
remove_filter( 'user_has_cap', array( $this, 'grant_edit_term' ), 10, 2 );
remove_filter( 'user_has_cap', array( $this, 'grant_edit_term' ) );

$this->assertSame( 200, $response->get_status() );
$data = $response->get_data();
Expand All @@ -1015,7 +1015,7 @@ public function test_update_item_with_edit_term_cap_revoked() {

add_filter( 'map_meta_cap', array( $this, 'revoke_edit_term' ), 10, 2 );
$response = rest_get_server()->dispatch( $request );
remove_filter( 'user_has_cap', array( $this, 'revoke_edit_term' ), 10, 2 );
remove_filter( 'user_has_cap', array( $this, 'revoke_edit_term' ) );

$this->assertErrorResponse( 'rest_cannot_update', $response, 403 );
}
Expand Down Expand Up @@ -1213,7 +1213,7 @@ public function test_delete_item_with_delete_term_cap_granted() {

add_filter( 'map_meta_cap', array( $this, 'grant_delete_term' ), 10, 2 );
$response = rest_get_server()->dispatch( $request );
remove_filter( 'map_meta_cap', array( $this, 'grant_delete_term' ), 10, 2 );
remove_filter( 'map_meta_cap', array( $this, 'grant_delete_term' ) );

$this->assertSame( 200, $response->get_status() );
$data = $response->get_data();
Expand Down Expand Up @@ -1241,7 +1241,7 @@ public function test_delete_item_with_delete_term_cap_revoked() {

add_filter( 'map_meta_cap', array( $this, 'revoke_delete_term' ), 10, 2 );
$response = rest_get_server()->dispatch( $request );
remove_filter( 'map_meta_cap', array( $this, 'revoke_delete_term' ), 10, 2 );
remove_filter( 'map_meta_cap', array( $this, 'revoke_delete_term' ) );

$this->assertErrorResponse( 'rest_cannot_delete', $response, 403 );
}
Expand Down
6 changes: 3 additions & 3 deletions tests/phpunit/tests/shortcode.php
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,7 @@ public function test_shortcode_atts_filter_passes_original_arguments() {
);
$this->assertSame( array( 'foo' => 'foo1' ), $this->filter_atts_atts );

remove_filter( 'shortcode_atts_bartag', array( $this, 'filter_atts' ), 10, 3 );
remove_filter( 'shortcode_atts_bartag', array( $this, 'filter_atts' ) );
}

public function test_shortcode_atts_filtering() {
Expand All @@ -513,7 +513,7 @@ public function test_shortcode_atts_filtering() {
$out = do_shortcode( '[bartag foo="foo2" /]' );
$this->assertSame( 'foo = foo2', $out );

remove_filter( 'shortcode_atts_bartag', array( $this, 'filter_atts2' ), 10, 3 );
remove_filter( 'shortcode_atts_bartag', array( $this, 'filter_atts2' ) );
}

/**
Expand Down Expand Up @@ -858,7 +858,7 @@ public function test_pre_do_shortcode_tag() {
$result_atts = do_shortcode( "[{$str} a='b' c='d']" );
$this->assertSame( wp_json_encode( $arr ), $result_atts );

remove_filter( 'pre_do_shortcode_tag', array( $this, 'filter_pre_do_shortcode_tag_attr' ), 12, 4 );
remove_filter( 'pre_do_shortcode_tag', array( $this, 'filter_pre_do_shortcode_tag_attr' ), 12 );
remove_filter( 'pre_do_shortcode_tag', array( $this, 'filter_pre_do_shortcode_tag_p11' ), 11 );
remove_filter( 'pre_do_shortcode_tag', array( $this, 'filter_pre_do_shortcode_tag_bar' ) );
remove_shortcode( $str );
Expand Down
2 changes: 1 addition & 1 deletion tests/phpunit/tests/term/query.php
Original file line number Diff line number Diff line change
Expand Up @@ -959,7 +959,7 @@ public function test_terms_pre_query_filter_should_bypass_database_query() {
)
);

remove_filter( 'terms_pre_query', array( __CLASS__, 'filter_terms_pre_query' ), 10, 2 );
remove_filter( 'terms_pre_query', array( __CLASS__, 'filter_terms_pre_query' ) );

// Make sure no queries were executed.
$this->assertSame( $num_queries, get_num_queries() );
Expand Down
2 changes: 1 addition & 1 deletion tests/phpunit/tests/term/wpGetObjectTerms.php
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ public function test_taxonomies_passed_to_wp_get_object_terms_filter_should_be_q

add_filter( 'wp_get_object_terms', array( $this, 'wp_get_object_terms_callback' ), 10, 3 );
$terms = wp_get_object_terms( 1, array( 'wptests_tax', 'wptests_tax_2' ) );
remove_filter( 'wp_get_object_terms', array( $this, 'wp_get_object_terms_callback' ), 10, 3 );
remove_filter( 'wp_get_object_terms', array( $this, 'wp_get_object_terms_callback' ) );

$this->assertSame( "'wptests_tax', 'wptests_tax_2'", $this->taxonomies );
}
Expand Down
2 changes: 1 addition & 1 deletion tests/phpunit/tests/term/wpInsertTerm.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public function test_wp_insert_delete_term() {
// Now delete it.
add_filter( 'delete_term', array( $this, 'deleted_term_cb' ), 10, 5 );
$this->assertTrue( wp_delete_term( $t['term_id'], $taxonomy ) );
remove_filter( 'delete_term', array( $this, 'deleted_term_cb' ), 10, 5 );
remove_filter( 'delete_term', array( $this, 'deleted_term_cb' ) );
$this->assertNull( term_exists( $term ) );
$this->assertNull( term_exists( $t['term_id'] ) );
$this->assertSame( $initial_count, wp_count_terms( array( 'taxonomy' => $taxonomy ) ) );
Expand Down
4 changes: 2 additions & 2 deletions tests/phpunit/tests/user/capabilities.php
Original file line number Diff line number Diff line change
Expand Up @@ -669,7 +669,7 @@ public function test_do_not_allow_is_denied_for_all_roles() {
// Test adding the cap via a filter.
add_filter( 'user_has_cap', array( $this, 'grant_do_not_allow' ), 10, 4 );
$has_cap = $user->has_cap( 'do_not_allow' );
remove_filter( 'user_has_cap', array( $this, 'grant_do_not_allow' ), 10, 4 );
remove_filter( 'user_has_cap', array( $this, 'grant_do_not_allow' ) );
$this->assertFalse( $has_cap, "User with the {$role} role should not have the do_not_allow capability" );

if ( 'anonymous' === $role ) {
Expand Down Expand Up @@ -700,7 +700,7 @@ public function test_do_not_allow_is_denied_for_super_admins() {
// Test adding the cap via a filter.
add_filter( 'user_has_cap', array( $this, 'grant_do_not_allow' ), 10, 4 );
$has_cap = self::$super_admin->has_cap( 'do_not_allow' );
remove_filter( 'user_has_cap', array( $this, 'grant_do_not_allow' ), 10, 4 );
remove_filter( 'user_has_cap', array( $this, 'grant_do_not_allow' ) );
$this->assertFalse( $has_cap, 'Super admins should not have the do_not_allow capability' );
}

Expand Down
2 changes: 1 addition & 1 deletion tests/phpunit/tests/user/query.php
Original file line number Diff line number Diff line change
Expand Up @@ -1720,7 +1720,7 @@ public function test_users_pre_query_filter_should_bypass_database_query() {
)
);

remove_filter( 'users_pre_query', array( __CLASS__, 'filter_users_pre_query' ), 10, 2 );
remove_filter( 'users_pre_query', array( __CLASS__, 'filter_users_pre_query' ) );

// Make sure no queries were executed.
$this->assertSame( $num_queries, get_num_queries() );
Expand Down
2 changes: 1 addition & 1 deletion tests/phpunit/tests/xmlrpc/wp/getPages.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,6 @@ public function test_semi_capable_user() {
}
$this->assertFalse( $found_incapable );

remove_filter( 'map_meta_cap', array( $this, 'remove_editor_edit_page_cap' ), 10, 4 );
remove_filter( 'map_meta_cap', array( $this, 'remove_editor_edit_page_cap' ) );
}
}
Loading