mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 14:20:15 +00:00
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:
@@ -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' );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -73,7 +73,6 @@ class WP_Filesystem_MockFS extends WP_Filesystem_Base {
|
||||
$this->put_contents( $path, 'This is a test 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() {
|
||||
|
||||
@@ -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 ) {
|
||||
|
||||
@@ -56,7 +56,6 @@ class WPProfiler {
|
||||
'filters' => array(),
|
||||
'queries' => array(),
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
public function stop() {
|
||||
|
||||
@@ -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' ) ) );
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -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'] );
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -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 ) );
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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 ) );
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,6 +34,5 @@ class Tests_Category_GetCategoryBySlug extends WP_UnitTestCase {
|
||||
|
||||
// Validate unknown category returns false.
|
||||
$this->assertFalse( get_category_by_slug( 'testcat3' ) );
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1012,7 +1012,6 @@ class Tests_Comment extends WP_UnitTestCase {
|
||||
),
|
||||
$this->preprocess_comment_data
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
public function filter_preprocess_comment( $commentdata ) {
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -55,7 +55,6 @@ class Tests_Comment_GetCommentLink extends WP_UnitTestCase {
|
||||
'comment_date_gmt' => gmdate( 'Y-m-d H:i:s', $now - 600 ),
|
||||
)
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -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 );
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -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() );
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -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
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -32,7 +32,6 @@ class Tests_Compat_arrayKeyFirst extends WP_UnitTestCase {
|
||||
array_key_first( $arr )
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -34,7 +34,6 @@ class Tests_Compat_strContains extends WP_UnitTestCase {
|
||||
str_contains( $haystack, $needle )
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -34,7 +34,6 @@ class Tests_Compat_StrEndsWith extends WP_UnitTestCase {
|
||||
str_ends_with( $haystack, $needle )
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -34,7 +34,6 @@ class Tests_Compat_StrStartsWith extends WP_UnitTestCase {
|
||||
str_starts_with( $haystack, $needle )
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -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() );
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -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' ) );
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -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 ) ) );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -311,7 +311,6 @@ class Tests_DB_dbDelta extends WP_UnitTestCase {
|
||||
);
|
||||
|
||||
$this->assertTableRowHasValue( 'column_1', 'wcphilly2015', $wpdb->prefix . 'dbdelta_test' );
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -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' ) );
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -56,7 +56,6 @@ class Tests_Feed_Atom extends WP_UnitTestCase {
|
||||
|
||||
// Assign a tagline option.
|
||||
update_option( 'blogdescription', 'Just another WordPress site' );
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -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' ),
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -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 );
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -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 );
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -151,7 +151,6 @@ class Tests_Formatting_EscUrl extends WP_UnitTestCase {
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -32,7 +32,6 @@ class Tests_Formatting_wpTexturize extends WP_UnitTestCase {
|
||||
|
||||
$invalid_nest = '<pre></code>"baba"</pre>';
|
||||
$this->assertSame( $invalid_nest, wptexturize( $invalid_nest ) );
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -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 ) );
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -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 ) );
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -129,7 +129,6 @@ class Tests_Link_ThemeFile extends WP_UnitTestCase {
|
||||
} else {
|
||||
$this->assertFileDoesNotExist( WP_CONTENT_DIR . "/themes/theme-file-parent/{$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 ) );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -870,7 +870,6 @@ BLOB;
|
||||
),
|
||||
$galleries
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -937,7 +936,6 @@ BLOB;
|
||||
),
|
||||
$galleries
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -243,6 +243,5 @@ class Tests_Menu_wpNavMenu extends WP_UnitTestCase {
|
||||
$menu_html,
|
||||
'The level zero menu item should appear in the menu.'
|
||||
);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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 );
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -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 );
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -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;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -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' ) );
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -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 ) );
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -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 );
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -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 ) );
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -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(
|
||||
|
||||
@@ -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]',
|
||||
|
||||
@@ -1920,7 +1920,6 @@ class Tests_Query_MetaQuery extends WP_UnitTestCase {
|
||||
);
|
||||
|
||||
$this->assertSameSets( array( $posts[0] ), $q->posts );
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -768,7 +768,6 @@ class Tests_Query_Results extends WP_UnitTestCase {
|
||||
$this->assertIsInt( $post->ID );
|
||||
$this->assertIsInt( $post->post_parent );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -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'] );
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -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 );
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -362,7 +362,6 @@ class WP_Test_REST_Controller extends WP_Test_REST_TestCase {
|
||||
|
||||
// Ignored properties.
|
||||
$this->assertArrayNotHasKey( 'ignored_prop', $args['someobject'] );
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -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.' );
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -653,7 +653,6 @@ class WP_REST_Pattern_Directory_Controller_Test extends WP_Test_REST_Controller_
|
||||
} else {
|
||||
$this->assertNotSame( $result_1, $result_2, $message );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -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 );
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -311,7 +311,6 @@ class WP_Test_REST_Sidebars_Controller extends WP_Test_REST_Controller_Testcase
|
||||
),
|
||||
$data
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -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;
|
||||
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -781,7 +781,6 @@ EOF;
|
||||
|
||||
$js = str_replace( "\'", "'", $matches[1] );
|
||||
$this->assertSame( $php, $js );
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -318,7 +318,6 @@ class Tests_Taxonomy extends WP_UnitTestCase {
|
||||
|
||||
unset( $GLOBALS['wp_taxonomies'][ $tax ] );
|
||||
_unregister_post_type( $post_type );
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -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() );
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -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 );
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -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'] );
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -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 );
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -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'] );
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -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() );
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -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']
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -81,7 +81,6 @@ class Tests_User_GetUserCount extends WP_UnitTestCase {
|
||||
|
||||
$count = get_user_count();
|
||||
$this->assertSame( $start_count + 1, $count );
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -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 ) );
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -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 ) {
|
||||
|
||||
@@ -42,7 +42,6 @@ class Tests_User_wpGetUsersWithNoRole extends WP_UnitTestCase {
|
||||
),
|
||||
$users
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -34,7 +34,6 @@ class Tests_Utils extends WP_UnitTestCase {
|
||||
$expected .= 'foo';
|
||||
|
||||
$this->assertSame( $expected, strip_ws( $in ) );
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -31,7 +31,6 @@ class Tests_Walker extends WP_UnitTestCase {
|
||||
|
||||
$this->assertSame( 1, $this->walker->get_number_of_root_elements( $items ) );
|
||||
$this->assertSame( '<li>1</li>', $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( '<li>1</li>', $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( '<li>1</li>', $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( '<li>1</li><li>2</li>', $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( '<li>1<ul><li>2</li></ul></li>', $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( '<li>1</li><li>2</li>', $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( '<li>1</li>', $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( '<li>1<ul><li>2</li></ul></li>', $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( '<li>1<ul><li>2</li></ul></li>', $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( '<li>1</li>', $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( '<li>4</li><li>5</li><li>6</li>', $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( '<li>4</li><li>5</li><li>6</li>', $output );
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -312,7 +299,6 @@ class Tests_Walker extends WP_UnitTestCase {
|
||||
$output = $this->walker->paged_walk( $items, 0, 2, 1 );
|
||||
|
||||
$this->assertSame( '<li>2</li>', $output );
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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( '<div id="%1$s" class="before-sidebar %2$s">', $wp_registered_sidebars[ $sidebar_id ]['before_sidebar'] );
|
||||
$this->assertStringContainsString( '</div> <!-- .before-sidebar -->', $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( '/<span class="special widget_text">/', $actual );
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -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] );
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user