mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 20:30:23 +00:00
Tests: Replace most instances of assertEquals() in phpunit/includes/ with assertSame().
Follow-up to [48937], [48939], [48940], [48944]. Props johnbillion, jrf, SergeyBiryukov. See #38266, #52482. git-svn-id: https://develop.svn.wordpress.org/trunk@50283 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -8,12 +8,12 @@ abstract class WP_Test_REST_TestCase extends WP_UnitTestCase {
|
||||
}
|
||||
|
||||
$this->assertWPError( $response );
|
||||
$this->assertEquals( $code, $response->get_error_code() );
|
||||
$this->assertSame( $code, $response->get_error_code() );
|
||||
|
||||
if ( null !== $status ) {
|
||||
$data = $response->get_error_data();
|
||||
$this->assertArrayHasKey( 'status', $data );
|
||||
$this->assertEquals( $status, $data['status'] );
|
||||
$this->assertSame( $status, $data['status'] );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user