Tests: Replace a few more instances of assertEquals()
with assertSame()
.
These were previously missed due to incorrect capitalization. Follow-up to [48937], [48939]. See #38266. git-svn-id: https://develop.svn.wordpress.org/trunk@48940 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
8be943d06e
commit
3e111d9799
@ -377,7 +377,7 @@ class Tests_Admin_includesScreen extends WP_UnitTestCase {
|
|||||||
// Add help tabs.
|
// Add help tabs.
|
||||||
|
|
||||||
$screen->add_help_tab( $tab_1_args );
|
$screen->add_help_tab( $tab_1_args );
|
||||||
$this->assertequals( $screen->get_help_tab( $tab_1 ), $tab_1_args );
|
$this->assertSame( $screen->get_help_tab( $tab_1 ), $tab_1_args );
|
||||||
|
|
||||||
$screen->add_help_tab( $tab_2_args );
|
$screen->add_help_tab( $tab_2_args );
|
||||||
$this->assertSame( $screen->get_help_tab( $tab_2 ), $tab_2_args );
|
$this->assertSame( $screen->get_help_tab( $tab_2 ), $tab_2_args );
|
||||||
|
@ -58,7 +58,7 @@ class Tests_Comment_GetCommentsPagesCount extends WP_UnitTestCase {
|
|||||||
$this->assertSame( 0, get_comment_pages_count( $comments, 10, true ) );
|
$this->assertSame( 0, get_comment_pages_count( $comments, 10, true ) );
|
||||||
$this->assertSame( 0, get_comment_pages_count( $comments, 5 ) );
|
$this->assertSame( 0, get_comment_pages_count( $comments, 5 ) );
|
||||||
$this->assertSame( 0, get_comment_pages_count( $comments ) );
|
$this->assertSame( 0, get_comment_pages_count( $comments ) );
|
||||||
$this->assertequals( 0, get_comment_pages_count( null, 1 ) );
|
$this->assertSame( 0, get_comment_pages_count( null, 1 ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -35,12 +35,12 @@ class Tests_Formatting_JSEscape extends WP_UnitTestCase {
|
|||||||
function test_js_no_carriage_return() {
|
function test_js_no_carriage_return() {
|
||||||
$out = esc_js( "foo\rbar\nbaz\r" );
|
$out = esc_js( "foo\rbar\nbaz\r" );
|
||||||
// \r is stripped.
|
// \r is stripped.
|
||||||
$this->assertequals( "foobar\\nbaz", $out );
|
$this->assertSame( "foobar\\nbaz", $out );
|
||||||
}
|
}
|
||||||
|
|
||||||
function test_js_escape_rn() {
|
function test_js_escape_rn() {
|
||||||
$out = esc_js( "foo\r\nbar\nbaz\r\n" );
|
$out = esc_js( "foo\r\nbar\nbaz\r\n" );
|
||||||
// \r is stripped.
|
// \r is stripped.
|
||||||
$this->assertequals( "foo\\nbar\\nbaz\\n", $out );
|
$this->assertSame( "foo\\nbar\\nbaz\\n", $out );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -202,7 +202,7 @@ class Tests_WP_Error extends WP_UnitTestCase {
|
|||||||
$this->wp_error->add( 'code', 'message' );
|
$this->wp_error->add( 'code', 'message' );
|
||||||
$this->wp_error->add( 'code', 'message2' );
|
$this->wp_error->add( 'code', 'message2' );
|
||||||
|
|
||||||
$this->assertequalSets( array( 'message', 'message2' ), $this->wp_error->get_error_messages( 'code' ) );
|
$this->assertSameSets( array( 'message', 'message2' ), $this->wp_error->get_error_messages( 'code' ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -218,7 +218,7 @@ class WP_REST_Plugins_Controller_Test extends WP_Test_REST_Controller_Testcase {
|
|||||||
public function test_get_items_insufficient_permissions() {
|
public function test_get_items_insufficient_permissions() {
|
||||||
wp_set_current_user( self::$subscriber_id );
|
wp_set_current_user( self::$subscriber_id );
|
||||||
$response = rest_do_request( self::BASE );
|
$response = rest_do_request( self::BASE );
|
||||||
$this->assertequals( 403, $response->get_status() );
|
$this->assertSame( 403, $response->get_status() );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user