<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[49547] trunk/tests/phpunit: Tests: Use `assertSame()` in some newly introduced tests.</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { white-space: pre-line; overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta" style="font-size: 105%">
<dt style="float: left; width: 6em; font-weight: bold">Revision</dt> <dd><a style="font-weight: bold" href="https://core.trac.wordpress.org/changeset/49547">49547</a><script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","description":"Review this Commit","action":{"@type":"ViewAction","url":"https://core.trac.wordpress.org/changeset/49547","name":"Review Commit"}}</script></dd>
<dt style="float: left; width: 6em; font-weight: bold">Author</dt> <dd>SergeyBiryukov</dd>
<dt style="float: left; width: 6em; font-weight: bold">Date</dt> <dd>2020-11-09 15:43:14 +0000 (Mon, 09 Nov 2020)</dd>
</dl>

<pre style='padding-left: 1em; margin: 2em 0; border-left: 2px solid #ccc; line-height: 1.25; font-size: 105%; font-family: sans-serif'>Tests: Use `assertSame()` in some newly introduced tests.

This ensures that not only the return values match the expected results, but also that their type is the same.

Going forward, stricter type checking by using `assertSame()` should generally be preferred to `assertEquals()` where appropriate, to make the tests more reliable.

Follow-up to <a href="https://core.trac.wordpress.org/changeset/48937">[48937]</a>, <a href="https://core.trac.wordpress.org/changeset/48939">[48939]</a>, <a href="https://core.trac.wordpress.org/changeset/48940">[48940]</a>, <a href="https://core.trac.wordpress.org/changeset/48944">[48944]</a>.

See <a href="https://core.trac.wordpress.org/ticket/38266">#38266</a>.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunktestsphpunitincludestestcaseblocksupportsphp">trunk/tests/phpunit/includes/testcase-block-supports.php</a></li>
<li><a href="#trunktestsphpunittestsauthphp">trunk/tests/phpunit/tests/auth.php</a></li>
<li><a href="#trunktestsphpunittestsfunctionsphp">trunk/tests/phpunit/tests/functions.php</a></li>
<li><a href="#trunktestsphpunittestsmultisitesitephp">trunk/tests/phpunit/tests/multisite/site.php</a></li>
<li><a href="#trunktestsphpunittestsrestapirestapplicationpasswordscontrollerphp">trunk/tests/phpunit/tests/rest-api/rest-application-passwords-controller.php</a></li>
<li><a href="#trunktestsphpunittestsrestapirestattachmentscontrollerphp">trunk/tests/phpunit/tests/rest-api/rest-attachments-controller.php</a></li>
<li><a href="#trunktestsphpunittestsrestapirestcommentscontrollerphp">trunk/tests/phpunit/tests/rest-api/rest-comments-controller.php</a></li>
<li><a href="#trunktestsphpunittestsrestapirestcontrollerphp">trunk/tests/phpunit/tests/rest-api/rest-controller.php</a></li>
<li><a href="#trunktestsphpunittestsrestapirestrequestphp">trunk/tests/phpunit/tests/rest-api/rest-request.php</a></li>
<li><a href="#trunktestsphpunittestsrestapirestsearchcontrollerphp">trunk/tests/phpunit/tests/rest-api/rest-search-controller.php</a></li>
<li><a href="#trunktestsphpunittestsrestapirestserverphp">trunk/tests/phpunit/tests/rest-api/rest-server.php</a></li>
<li><a href="#trunktestsphpunittestsrestapirestsitehealthcontrollerphp">trunk/tests/phpunit/tests/rest-api/rest-site-health-controller.php</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunktestsphpunitincludestestcaseblocksupportsphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/includes/testcase-block-supports.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/includes/testcase-block-supports.php  2020-11-09 15:33:51 UTC (rev 49546)
+++ trunk/tests/phpunit/includes/testcase-block-supports.php    2020-11-09 15:43:14 UTC (rev 49547)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -123,8 +123,8 @@
</span><span class="cx" style="display: block; padding: 0 10px">                $class_list   = $this->get_attribute_from_block( 'class', $styled_block );
</span><span class="cx" style="display: block; padding: 0 10px">                $style_list   = $this->get_attribute_from_block( 'style', $styled_block );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertEquals( $expected_classes, $class_list );
-               $this->assertEquals( $expected_styles, $style_list );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertSame( $expected_classes, $class_list );
+               $this->assertSame( $expected_styles, $style_list );
</ins><span class="cx" style="display: block; padding: 0 10px">         }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">        /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -138,18 +138,18 @@
</span><span class="cx" style="display: block; padding: 0 10px">                $styled_block = $this->render_example_block( $block );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                // Ensure blocks to not add extra whitespace.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertEquals( $styled_block, trim( $styled_block ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertSame( $styled_block, trim( $styled_block ) );
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $content    = $this->get_content_from_block( $styled_block );
</span><span class="cx" style="display: block; padding: 0 10px">                $class_list = $this->get_attribute_from_block( 'class', $styled_block );
</span><span class="cx" style="display: block; padding: 0 10px">                $style_list = $this->get_attribute_from_block( 'style', $styled_block );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertEquals( self::BLOCK_CONTENT, $content );
-               $this->assertEqualSets(
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertSame( self::BLOCK_CONTENT, $content );
+               $this->assertSameSets(
</ins><span class="cx" style="display: block; padding: 0 10px">                         explode( ' ', $expected_classes ),
</span><span class="cx" style="display: block; padding: 0 10px">                        explode( ' ', $class_list )
</span><span class="cx" style="display: block; padding: 0 10px">                );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertEquals(
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertSame(
</ins><span class="cx" style="display: block; padding: 0 10px">                         array_map( 'trim', explode( ';', $expected_styles ) ),
</span><span class="cx" style="display: block; padding: 0 10px">                        array_map( 'trim', explode( ';', $style_list ) )
</span><span class="cx" style="display: block; padding: 0 10px">                );
</span></span></pre></div>
<a id="trunktestsphpunittestsauthphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/tests/auth.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/auth.php        2020-11-09 15:33:51 UTC (rev 49546)
+++ trunk/tests/phpunit/tests/auth.php  2020-11-09 15:43:14 UTC (rev 49547)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -451,8 +451,8 @@
</span><span class="cx" style="display: block; padding: 0 10px">                $_SERVER['PHP_AUTH_USER'] = 'http_auth_login';
</span><span class="cx" style="display: block; padding: 0 10px">                $_SERVER['PHP_AUTH_PW']   = 'http_auth_pass';
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertEquals(
-                       0,
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertSame(
+                       null,
</ins><span class="cx" style="display: block; padding: 0 10px">                         wp_validate_application_password( null ),
</span><span class="cx" style="display: block; padding: 0 10px">                        'Regular user account password should not be allowed for API authentication'
</span><span class="cx" style="display: block; padding: 0 10px">                );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -460,7 +460,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                // Not try with an App password instead.
</span><span class="cx" style="display: block; padding: 0 10px">                $_SERVER['PHP_AUTH_PW'] = $user_app_password;
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertEquals(
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertSame(
</ins><span class="cx" style="display: block; padding: 0 10px">                         $user_id,
</span><span class="cx" style="display: block; padding: 0 10px">                        wp_validate_application_password( null ),
</span><span class="cx" style="display: block; padding: 0 10px">                        'Application passwords should be allowed for API authentication'
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -491,7 +491,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $error = wp_authenticate_application_password( null, 'idonotexist', 'password' );
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertWPError( $error );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertEquals( 'invalid_username', $error->get_error_code() );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertSame( 'invalid_username', $error->get_error_code() );
</ins><span class="cx" style="display: block; padding: 0 10px">         }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">        /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -502,7 +502,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $error = wp_authenticate_application_password( null, 'idonotexist@example.org', 'password' );
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertWPError( $error );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertEquals( 'invalid_email', $error->get_error_code() );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertSame( 'invalid_email', $error->get_error_code() );
</ins><span class="cx" style="display: block; padding: 0 10px">         }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">        /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -514,7 +514,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $error = wp_authenticate_application_password( null, self::$_user->user_login, 'password' );
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertWPError( $error );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertEquals( 'application_passwords_disabled', $error->get_error_code() );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertSame( 'application_passwords_disabled', $error->get_error_code() );
</ins><span class="cx" style="display: block; padding: 0 10px">         }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">        /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -527,7 +527,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $error = wp_authenticate_application_password( null, self::$_user->user_login, 'password' );
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertWPError( $error );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertEquals( 'application_passwords_disabled', $error->get_error_code() );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertSame( 'application_passwords_disabled', $error->get_error_code() );
</ins><span class="cx" style="display: block; padding: 0 10px">         }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">        /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -539,7 +539,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $error = wp_authenticate_application_password( null, self::$_user->user_login, 'password' );
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertWPError( $error );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertEquals( 'incorrect_password', $error->get_error_code() );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertSame( 'incorrect_password', $error->get_error_code() );
</ins><span class="cx" style="display: block; padding: 0 10px">         }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">        /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -560,7 +560,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $error = wp_authenticate_application_password( null, self::$_user->user_login, $password );
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertWPError( $error );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertEquals( 'my_code', $error->get_error_code() );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertSame( 'my_code', $error->get_error_code() );
</ins><span class="cx" style="display: block; padding: 0 10px">         }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">        /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -574,7 +574,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $user = wp_authenticate_application_password( null, self::$_user->user_login, $password );
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertInstanceOf( WP_User::class, $user );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertEquals( self::$user_id, $user->ID );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertSame( self::$user_id, $user->ID );
</ins><span class="cx" style="display: block; padding: 0 10px">         }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">        /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -588,7 +588,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $user = wp_authenticate_application_password( null, self::$_user->user_email, $password );
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertInstanceOf( WP_User::class, $user );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertEquals( self::$user_id, $user->ID );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertSame( self::$user_id, $user->ID );
</ins><span class="cx" style="display: block; padding: 0 10px">         }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">        /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -602,6 +602,6 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $user = wp_authenticate_application_password( null, self::$_user->user_email, WP_Application_Passwords::chunk_password( $password ) );
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertInstanceOf( WP_User::class, $user );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertEquals( self::$user_id, $user->ID );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertSame( self::$user_id, $user->ID );
</ins><span class="cx" style="display: block; padding: 0 10px">         }
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span></span></pre></div>
<a id="trunktestsphpunittestsfunctionsphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/tests/functions.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/functions.php   2020-11-09 15:33:51 UTC (rev 49546)
+++ trunk/tests/phpunit/tests/functions.php     2020-11-09 15:43:14 UTC (rev 49547)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1763,7 +1763,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">         * @dataProvider data_test_wp_is_json_media_type
</span><span class="cx" style="display: block; padding: 0 10px">         */
</span><span class="cx" style="display: block; padding: 0 10px">        public function test_wp_is_json_media_type( $input, $expected ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertEquals( $expected, wp_is_json_media_type( $input ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertSame( $expected, wp_is_json_media_type( $input ) );
</ins><span class="cx" style="display: block; padding: 0 10px">         }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span></span></pre></div>
<a id="trunktestsphpunittestsmultisitesitephp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/tests/multisite/site.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/multisite/site.php      2020-11-09 15:33:51 UTC (rev 49546)
+++ trunk/tests/phpunit/tests/multisite/site.php        2020-11-09 15:43:14 UTC (rev 49547)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -502,7 +502,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                        restore_current_blog();
</span><span class="cx" style="display: block; padding: 0 10px">                        $this->assertNotEmpty( $spam_permalink );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                        $this->assertEquals( $post_data['post_title'], $post->post_title );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                 $this->assertSame( $post_data['post_title'], $post->post_title );
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                        update_blog_status( $spam_blog_id, 'spam', 1 );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span></span></pre></div>
<a id="trunktestsphpunittestsrestapirestapplicationpasswordscontrollerphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/tests/rest-api/rest-application-passwords-controller.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/rest-api/rest-application-passwords-controller.php      2020-11-09 15:33:51 UTC (rev 49546)
+++ trunk/tests/phpunit/tests/rest-api/rest-application-passwords-controller.php        2020-11-09 15:43:14 UTC (rev 49547)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -134,7 +134,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                list( , $item ) = WP_Application_Passwords::create_new_application_password( self::$admin, array( 'name' => 'App' ) );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $response = rest_do_request( '/wp/v2/users/me/application-passwords' );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertEquals( 200, $response->get_status() );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertSame( 200, $response->get_status() );
</ins><span class="cx" style="display: block; padding: 0 10px">                 $this->assertCount( 1, $response->get_data() );
</span><span class="cx" style="display: block; padding: 0 10px">                $this->check_response( $response->get_data()[0], $item );
</span><span class="cx" style="display: block; padding: 0 10px">        }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -147,7 +147,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                list( , $item ) = WP_Application_Passwords::create_new_application_password( self::$admin, array( 'name' => 'App' ) );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $response = rest_do_request( sprintf( '/wp/v2/users/%d/application-passwords', self::$admin ) );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertEquals( 200, $response->get_status() );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertSame( 200, $response->get_status() );
</ins><span class="cx" style="display: block; padding: 0 10px">                 $this->assertCount( 1, $response->get_data() );
</span><span class="cx" style="display: block; padding: 0 10px">                $this->check_response( $response->get_data()[0], $item );
</span><span class="cx" style="display: block; padding: 0 10px">        }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -160,7 +160,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                list( , $item ) = WP_Application_Passwords::create_new_application_password( self::$subscriber_id, array( 'name' => 'App' ) );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $response = rest_do_request( sprintf( '/wp/v2/users/%d/application-passwords', self::$subscriber_id ) );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertEquals( 200, $response->get_status() );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertSame( 200, $response->get_status() );
</ins><span class="cx" style="display: block; padding: 0 10px">                 $this->assertCount( 1, $response->get_data() );
</span><span class="cx" style="display: block; padding: 0 10px">                $this->check_response( $response->get_data()[0], $item );
</span><span class="cx" style="display: block; padding: 0 10px">        }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -173,7 +173,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                list( , $item ) = WP_Application_Passwords::create_new_application_password( self::$subscriber_id, array( 'name' => 'App' ) );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $response = rest_do_request( sprintf( '/wp/v2/users/%d/application-passwords', self::$subscriber_id ) );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertEquals( 200, $response->get_status() );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertSame( 200, $response->get_status() );
</ins><span class="cx" style="display: block; padding: 0 10px">                 $this->assertCount( 1, $response->get_data() );
</span><span class="cx" style="display: block; padding: 0 10px">                $this->check_response( $response->get_data()[0], $item );
</span><span class="cx" style="display: block; padding: 0 10px">        }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -215,7 +215,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $uuid     = $item['uuid'];
</span><span class="cx" style="display: block; padding: 0 10px">                $response = rest_do_request( '/wp/v2/users/me/application-passwords/' . $uuid );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertEquals( 200, $response->get_status() );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertSame( 200, $response->get_status() );
</ins><span class="cx" style="display: block; padding: 0 10px">                 $this->check_response( $response->get_data(), $item );
</span><span class="cx" style="display: block; padding: 0 10px">        }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -228,7 +228,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $uuid     = $item['uuid'];
</span><span class="cx" style="display: block; padding: 0 10px">                $response = rest_do_request( sprintf( '/wp/v2/users/%d/application-passwords/%s', self::$admin, $uuid ) );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertEquals( 200, $response->get_status() );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertSame( 200, $response->get_status() );
</ins><span class="cx" style="display: block; padding: 0 10px">                 $this->check_response( $response->get_data(), $item );
</span><span class="cx" style="display: block; padding: 0 10px">        }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -241,7 +241,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $uuid     = $item['uuid'];
</span><span class="cx" style="display: block; padding: 0 10px">                $response = rest_do_request( sprintf( '/wp/v2/users/%d/application-passwords/%s', self::$subscriber_id, $uuid ) );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertEquals( 200, $response->get_status() );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertSame( 200, $response->get_status() );
</ins><span class="cx" style="display: block; padding: 0 10px">                 $this->check_response( $response->get_data(), $item );
</span><span class="cx" style="display: block; padding: 0 10px">        }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -254,7 +254,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $uuid     = $item['uuid'];
</span><span class="cx" style="display: block; padding: 0 10px">                $response = rest_do_request( sprintf( '/wp/v2/users/%d/application-passwords/%s', self::$subscriber_id, $uuid ) );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertEquals( 200, $response->get_status() );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertSame( 200, $response->get_status() );
</ins><span class="cx" style="display: block; padding: 0 10px">                 $this->check_response( $response->get_data(), $item );
</span><span class="cx" style="display: block; padding: 0 10px">        }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -318,13 +318,13 @@
</span><span class="cx" style="display: block; padding: 0 10px">                );
</span><span class="cx" style="display: block; padding: 0 10px">                $response = rest_do_request( $request );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertEquals( 201, $response->get_status() );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertSame( 201, $response->get_status() );
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $passwords = WP_Application_Passwords::get_user_application_passwords( self::$admin );
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertCount( 1, $passwords );
</span><span class="cx" style="display: block; padding: 0 10px">                $this->check_response( $response->get_data(), $passwords[0], true );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertEquals( 'App', $response->get_data()['name'] );
-               $this->assertEquals( $app_id, $response->get_data()['app_id'] );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertSame( 'App', $response->get_data()['name'] );
+               $this->assertSame( $app_id, $response->get_data()['app_id'] );
</ins><span class="cx" style="display: block; padding: 0 10px">                 $this->assertNull( $response->get_data()['last_used'] );
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertNull( $response->get_data()['last_ip'] );
</span><span class="cx" style="display: block; padding: 0 10px">        }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -339,7 +339,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                $request->set_body_params( array( 'name' => 'App' ) );
</span><span class="cx" style="display: block; padding: 0 10px">                $response = rest_do_request( $request );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertEquals( 201, $response->get_status() );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertSame( 201, $response->get_status() );
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $passwords = WP_Application_Passwords::get_user_application_passwords( self::$admin );
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertCount( 1, $passwords );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -356,7 +356,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                $request->set_body_params( array( 'name' => 'App' ) );
</span><span class="cx" style="display: block; padding: 0 10px">                $response = rest_do_request( $request );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertEquals( 201, $response->get_status() );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertSame( 201, $response->get_status() );
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $passwords = WP_Application_Passwords::get_user_application_passwords( self::$subscriber_id );
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertCount( 1, $passwords );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -373,7 +373,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                $request->set_body_params( array( 'name' => 'App' ) );
</span><span class="cx" style="display: block; padding: 0 10px">                $response = rest_do_request( $request );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertEquals( 201, $response->get_status() );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertSame( 201, $response->get_status() );
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $passwords = WP_Application_Passwords::get_user_application_passwords( self::$subscriber_id );
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertCount( 1, $passwords );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -415,9 +415,9 @@
</span><span class="cx" style="display: block; padding: 0 10px">                $request = new WP_REST_Request( 'PUT', '/wp/v2/users/me/application-passwords/' . $uuid );
</span><span class="cx" style="display: block; padding: 0 10px">                $request->set_body_params( array( 'name' => 'New App' ) );
</span><span class="cx" style="display: block; padding: 0 10px">                $response = rest_do_request( $request );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertEquals( 200, $response->get_status() );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertSame( 200, $response->get_status() );
</ins><span class="cx" style="display: block; padding: 0 10px">                 $this->check_response( $response->get_data(), WP_Application_Passwords::get_user_application_password( self::$admin, $item['uuid'] ) );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertEquals( 'New App', $response->get_data()['name'] );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertSame( 'New App', $response->get_data()['name'] );
</ins><span class="cx" style="display: block; padding: 0 10px">         }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">        /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -431,9 +431,9 @@
</span><span class="cx" style="display: block; padding: 0 10px">                $request = new WP_REST_Request( 'PUT', sprintf( '/wp/v2/users/%d/application-passwords/%s', self::$admin, $uuid ) );
</span><span class="cx" style="display: block; padding: 0 10px">                $request->set_body_params( array( 'name' => 'New App' ) );
</span><span class="cx" style="display: block; padding: 0 10px">                $response = rest_do_request( $request );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertEquals( 200, $response->get_status() );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertSame( 200, $response->get_status() );
</ins><span class="cx" style="display: block; padding: 0 10px">                 $this->check_response( $response->get_data(), WP_Application_Passwords::get_user_application_password( self::$admin, $item['uuid'] ) );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertEquals( 'New App', $response->get_data()['name'] );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertSame( 'New App', $response->get_data()['name'] );
</ins><span class="cx" style="display: block; padding: 0 10px">         }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">        /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -447,9 +447,9 @@
</span><span class="cx" style="display: block; padding: 0 10px">                $request = new WP_REST_Request( 'PUT', sprintf( '/wp/v2/users/%d/application-passwords/%s', self::$subscriber_id, $uuid ) );
</span><span class="cx" style="display: block; padding: 0 10px">                $request->set_body_params( array( 'name' => 'New App' ) );
</span><span class="cx" style="display: block; padding: 0 10px">                $response = rest_do_request( $request );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertEquals( 200, $response->get_status() );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertSame( 200, $response->get_status() );
</ins><span class="cx" style="display: block; padding: 0 10px">                 $this->check_response( $response->get_data(), WP_Application_Passwords::get_user_application_password( self::$subscriber_id, $item['uuid'] ) );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertEquals( 'New App', $response->get_data()['name'] );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertSame( 'New App', $response->get_data()['name'] );
</ins><span class="cx" style="display: block; padding: 0 10px">         }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">        /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -463,9 +463,9 @@
</span><span class="cx" style="display: block; padding: 0 10px">                $request = new WP_REST_Request( 'PUT', sprintf( '/wp/v2/users/%d/application-passwords/%s', self::$subscriber_id, $uuid ) );
</span><span class="cx" style="display: block; padding: 0 10px">                $request->set_body_params( array( 'name' => 'New App' ) );
</span><span class="cx" style="display: block; padding: 0 10px">                $response = rest_do_request( $request );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertEquals( 200, $response->get_status() );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertSame( 200, $response->get_status() );
</ins><span class="cx" style="display: block; padding: 0 10px">                 $this->check_response( $response->get_data(), WP_Application_Passwords::get_user_application_password( self::$subscriber_id, $item['uuid'] ) );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertEquals( 'New App', $response->get_data()['name'] );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertSame( 'New App', $response->get_data()['name'] );
</ins><span class="cx" style="display: block; padding: 0 10px">         }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">        /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -531,7 +531,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                $request = new WP_REST_Request( 'PUT', '/wp/v2/users/me/application-passwords/' . $uuid );
</span><span class="cx" style="display: block; padding: 0 10px">                $request->set_body_params( array( 'app_id' => wp_generate_uuid4() ) );
</span><span class="cx" style="display: block; padding: 0 10px">                $response = rest_do_request( $request );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertEquals( '', $response->get_data()['app_id'] );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertSame( '', $response->get_data()['app_id'] );
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $app_id = wp_generate_uuid4();
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -547,7 +547,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                $request = new WP_REST_Request( 'PUT', '/wp/v2/users/me/application-passwords/' . $uuid );
</span><span class="cx" style="display: block; padding: 0 10px">                $request->set_body_params( array( 'app_id' => wp_generate_uuid4() ) );
</span><span class="cx" style="display: block; padding: 0 10px">                $response = rest_do_request( $request );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertEquals( $app_id, $response->get_data()['app_id'] );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertSame( $app_id, $response->get_data()['app_id'] );
</ins><span class="cx" style="display: block; padding: 0 10px">         }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">        /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -560,7 +560,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                $uuid     = $item['uuid'];
</span><span class="cx" style="display: block; padding: 0 10px">                $request  = new WP_REST_Request( 'DELETE', '/wp/v2/users/me/application-passwords/' . $uuid );
</span><span class="cx" style="display: block; padding: 0 10px">                $response = rest_do_request( $request );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertEquals( 200, $response->get_status() );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertSame( 200, $response->get_status() );
</ins><span class="cx" style="display: block; padding: 0 10px">                 $this->assertArrayHasKey( 'deleted', $response->get_data() );
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertTrue( $response->get_data()['deleted'] );
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertArrayHasKey( 'previous', $response->get_data() );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -579,7 +579,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                $uuid     = $item ['uuid'];
</span><span class="cx" style="display: block; padding: 0 10px">                $request  = new WP_REST_Request( 'DELETE', sprintf( '/wp/v2/users/%d/application-passwords/%s', self::$admin, $uuid ) );
</span><span class="cx" style="display: block; padding: 0 10px">                $response = rest_do_request( $request );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertEquals( 200, $response->get_status() );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertSame( 200, $response->get_status() );
</ins><span class="cx" style="display: block; padding: 0 10px">                 $this->check_response( $response->get_data()['previous'], $item );
</span><span class="cx" style="display: block; padding: 0 10px">        }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -593,7 +593,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                $uuid     = $item['uuid'];
</span><span class="cx" style="display: block; padding: 0 10px">                $request  = new WP_REST_Request( 'DELETE', sprintf( '/wp/v2/users/%d/application-passwords/%s', self::$subscriber_id, $uuid ) );
</span><span class="cx" style="display: block; padding: 0 10px">                $response = rest_do_request( $request );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertEquals( 200, $response->get_status() );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertSame( 200, $response->get_status() );
</ins><span class="cx" style="display: block; padding: 0 10px">                 $this->check_response( $response->get_data()['previous'], $item );
</span><span class="cx" style="display: block; padding: 0 10px">        }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -607,7 +607,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                $uuid     = $item['uuid'];
</span><span class="cx" style="display: block; padding: 0 10px">                $request  = new WP_REST_Request( 'DELETE', sprintf( '/wp/v2/users/%d/application-passwords/%s', self::$subscriber_id, $uuid ) );
</span><span class="cx" style="display: block; padding: 0 10px">                $response = rest_do_request( $request );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertEquals( 200, $response->get_status() );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertSame( 200, $response->get_status() );
</ins><span class="cx" style="display: block; padding: 0 10px">                 $this->check_response( $response->get_data()['previous'], $item );
</span><span class="cx" style="display: block; padding: 0 10px">        }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -669,11 +669,11 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $request  = new WP_REST_Request( 'DELETE', '/wp/v2/users/me/application-passwords' );
</span><span class="cx" style="display: block; padding: 0 10px">                $response = rest_do_request( $request );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertEquals( 200, $response->get_status() );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertSame( 200, $response->get_status() );
</ins><span class="cx" style="display: block; padding: 0 10px">                 $this->assertArrayHasKey( 'deleted', $response->get_data() );
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertTrue( $response->get_data()['deleted'] );
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertArrayHasKey( 'count', $response->get_data() );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertEquals( 2, $response->get_data()['count'] );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertSame( 2, $response->get_data()['count'] );
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertCount( 0, WP_Application_Passwords::get_user_application_passwords( self::$admin ) );
</span><span class="cx" style="display: block; padding: 0 10px">        }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -687,7 +687,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $request  = new WP_REST_Request( 'DELETE', sprintf( '/wp/v2/users/%d/application-passwords', self::$admin ) );
</span><span class="cx" style="display: block; padding: 0 10px">                $response = rest_do_request( $request );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertEquals( 200, $response->get_status() );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertSame( 200, $response->get_status() );
</ins><span class="cx" style="display: block; padding: 0 10px">                 $this->assertCount( 0, WP_Application_Passwords::get_user_application_passwords( self::$admin ) );
</span><span class="cx" style="display: block; padding: 0 10px">        }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -700,7 +700,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $request  = new WP_REST_Request( 'DELETE', sprintf( '/wp/v2/users/%d/application-passwords', self::$subscriber_id ) );
</span><span class="cx" style="display: block; padding: 0 10px">                $response = rest_do_request( $request );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertEquals( 200, $response->get_status() );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertSame( 200, $response->get_status() );
</ins><span class="cx" style="display: block; padding: 0 10px">                 $this->assertCount( 0, WP_Application_Passwords::get_user_application_passwords( self::$admin ) );
</span><span class="cx" style="display: block; padding: 0 10px">        }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -713,7 +713,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $request  = new WP_REST_Request( 'DELETE', sprintf( '/wp/v2/users/%d/application-passwords', self::$subscriber_id ) );
</span><span class="cx" style="display: block; padding: 0 10px">                $response = rest_do_request( $request );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertEquals( 200, $response->get_status() );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertSame( 200, $response->get_status() );
</ins><span class="cx" style="display: block; padding: 0 10px">                 $this->assertCount( 0, WP_Application_Passwords::get_user_application_passwords( self::$admin ) );
</span><span class="cx" style="display: block; padding: 0 10px">        }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -818,19 +818,19 @@
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertArrayHasKey( 'last_used', $response );
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertArrayHasKey( 'last_ip', $response );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertEquals( $item['uuid'], $response['uuid'] );
-               $this->assertEquals( $item['app_id'], $response['app_id'] );
-               $this->assertEquals( $item['name'], $response['name'] );
-               $this->assertEquals( gmdate( 'Y-m-d\TH:i:s', $item['created'] ), $response['created'] );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertSame( $item['uuid'], $response['uuid'] );
+               $this->assertSame( $item['app_id'], $response['app_id'] );
+               $this->assertSame( $item['name'], $response['name'] );
+               $this->assertSame( gmdate( 'Y-m-d\TH:i:s', $item['created'] ), $response['created'] );
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                if ( $item['last_used'] ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                        $this->assertEquals( gmdate( 'Y-m-d\TH:i:s', $item['last_used'] ), $response['last_used'] );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                 $this->assertSame( gmdate( 'Y-m-d\TH:i:s', $item['last_used'] ), $response['last_used'] );
</ins><span class="cx" style="display: block; padding: 0 10px">                 } else {
</span><span class="cx" style="display: block; padding: 0 10px">                        $this->assertNull( $response['last_used'] );
</span><span class="cx" style="display: block; padding: 0 10px">                }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                if ( $item['last_ip'] ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                        $this->assertEquals( $item['last_ip'], $response['last_ip'] );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                 $this->assertSame( $item['last_ip'], $response['last_ip'] );
</ins><span class="cx" style="display: block; padding: 0 10px">                 } else {
</span><span class="cx" style="display: block; padding: 0 10px">                        $this->assertNull( $response['last_ip'] );
</span><span class="cx" style="display: block; padding: 0 10px">                }
</span></span></pre></div>
<a id="trunktestsphpunittestsrestapirestattachmentscontrollerphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/tests/rest-api/rest-attachments-controller.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/rest-api/rest-attachments-controller.php        2020-11-09 15:33:51 UTC (rev 49546)
+++ trunk/tests/phpunit/tests/rest-api/rest-attachments-controller.php  2020-11-09 15:43:14 UTC (rev 49547)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1028,7 +1028,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                $response = rest_get_server()->dispatch( $request );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertNotWPError( $response->as_error() );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertEquals( 'inherit', $response->get_data()['status'] );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertSame( 'inherit', $response->get_data()['status'] );
</ins><span class="cx" style="display: block; padding: 0 10px">         }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">        /**
</span></span></pre></div>
<a id="trunktestsphpunittestsrestapirestcommentscontrollerphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/tests/rest-api/rest-comments-controller.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/rest-api/rest-comments-controller.php   2020-11-09 15:33:51 UTC (rev 49546)
+++ trunk/tests/phpunit/tests/rest-api/rest-comments-controller.php     2020-11-09 15:43:14 UTC (rev 49547)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1440,7 +1440,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $response = rest_get_server()->dispatch( $request );
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertSame( 201, $response->get_status() );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertEquals( '0', $response->get_data()['content']['raw'] );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertSame( '0', $response->get_data()['content']['raw'] );
</ins><span class="cx" style="display: block; padding: 0 10px">         }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">        /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1465,7 +1465,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $response = rest_get_server()->dispatch( $request );
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertSame( 201, $response->get_status() );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertEquals( '', $response->get_data()['content']['raw'] );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertSame( '', $response->get_data()['content']['raw'] );
</ins><span class="cx" style="display: block; padding: 0 10px">         }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">        public function test_create_item_invalid_date() {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -3325,7 +3325,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                if ( $comment->comment_post_ID ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                        $this->assertEquals( rest_url( '/wp/v2/posts/' . $comment->comment_post_ID ), $links['up'][0]['href'] );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                 $this->assertSame( rest_url( '/wp/v2/posts/' . $comment->comment_post_ID ), $links['up'][0]['href'] );
</ins><span class="cx" style="display: block; padding: 0 10px">                 }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                if ( 'edit' === $context ) {
</span></span></pre></div>
<a id="trunktestsphpunittestsrestapirestcontrollerphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/tests/rest-api/rest-controller.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/rest-api/rest-controller.php    2020-11-09 15:33:51 UTC (rev 49546)
+++ trunk/tests/phpunit/tests/rest-api/rest-controller.php      2020-11-09 15:43:14 UTC (rev 49547)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -248,7 +248,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                $controller = new WP_REST_Test_Controller();
</span><span class="cx" style="display: block; padding: 0 10px">                $args       = rest_get_endpoint_args_for_schema( $controller->get_item_schema() );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertEquals( 'A pretty string.', $args['somestring']['description'] );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertSame( 'A pretty string.', $args['somestring']['description'] );
</ins><span class="cx" style="display: block; padding: 0 10px">                 $this->assertFalse( isset( $args['someinteger']['description'] ) );
</span><span class="cx" style="display: block; padding: 0 10px">        }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span></span></pre></div>
<a id="trunktestsphpunittestsrestapirestrequestphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/tests/rest-api/rest-request.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/rest-api/rest-request.php       2020-11-09 15:33:51 UTC (rev 49546)
+++ trunk/tests/phpunit/tests/rest-api/rest-request.php 2020-11-09 15:43:14 UTC (rev 49547)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -205,7 +205,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                $this->request->set_attributes( array( 'accept_json' => true ) );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                // Check that JSON takes precedence.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertEquals( $source, $this->request->get_param( 'source' ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertSame( $source, $this->request->get_param( 'source' ) );
</ins><span class="cx" style="display: block; padding: 0 10px">                 $this->assertEquals( $accept_json, $this->request->get_param( 'has_json_params' ) );
</span><span class="cx" style="display: block; padding: 0 10px">        }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -233,7 +233,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                $this->request->set_header( 'Content-Type', $content_type );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                // Check for JSON content-type.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertEquals( $is_json, $this->request->is_json_content_type() );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertSame( $is_json, $this->request->is_json_content_type() );
</ins><span class="cx" style="display: block; padding: 0 10px">         }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">        /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -926,6 +926,6 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $valid = $request->has_valid_params();
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertWPError( $valid );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertEquals( 'rest_invalid_param', $valid->get_error_code() );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertSame( 'rest_invalid_param', $valid->get_error_code() );
</ins><span class="cx" style="display: block; padding: 0 10px">         }
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span></span></pre></div>
<a id="trunktestsphpunittestsrestapirestsearchcontrollerphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/tests/rest-api/rest-search-controller.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/rest-api/rest-search-controller.php     2020-11-09 15:33:51 UTC (rev 49546)
+++ trunk/tests/phpunit/tests/rest-api/rest-search-controller.php       2020-11-09 15:43:14 UTC (rev 49547)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -569,8 +569,8 @@
</span><span class="cx" style="display: block; padding: 0 10px">                                'type'     => 'term',
</span><span class="cx" style="display: block; padding: 0 10px">                        )
</span><span class="cx" style="display: block; padding: 0 10px">                );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertEquals( 200, $response->get_status() );
-               $this->assertEqualSets(
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertSame( 200, $response->get_status() );
+               $this->assertSameSets(
</ins><span class="cx" style="display: block; padding: 0 10px">                         array(
</span><span class="cx" style="display: block; padding: 0 10px">                                0 => 1, // That is the default category.
</span><span class="cx" style="display: block; padding: 0 10px">                                self::$my_category_id,
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -594,8 +594,8 @@
</span><span class="cx" style="display: block; padding: 0 10px">                        )
</span><span class="cx" style="display: block; padding: 0 10px">                );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertEquals( 200, $response->get_status() );
-               $this->assertEqualSets(
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertSame( 200, $response->get_status() );
+               $this->assertSameSets(
</ins><span class="cx" style="display: block; padding: 0 10px">                         array(
</span><span class="cx" style="display: block; padding: 0 10px">                                0 => 1, // That is the default category.
</span><span class="cx" style="display: block; padding: 0 10px">                                self::$my_category_id,
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -634,8 +634,8 @@
</span><span class="cx" style="display: block; padding: 0 10px">                                'subtype'  => 'category,post_tag',
</span><span class="cx" style="display: block; padding: 0 10px">                        )
</span><span class="cx" style="display: block; padding: 0 10px">                );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertEquals( 200, $response->get_status() );
-               $this->assertEqualSets(
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertSame( 200, $response->get_status() );
+               $this->assertSameSets(
</ins><span class="cx" style="display: block; padding: 0 10px">                         array(
</span><span class="cx" style="display: block; padding: 0 10px">                                0 => 1, // This is the default category.
</span><span class="cx" style="display: block; padding: 0 10px">                                self::$my_category_id,
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -659,8 +659,8 @@
</span><span class="cx" style="display: block; padding: 0 10px">                        )
</span><span class="cx" style="display: block; padding: 0 10px">                );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertEquals( 200, $response->get_status() );
-               $this->assertEqualSets(
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertSame( 200, $response->get_status() );
+               $this->assertSameSets(
</ins><span class="cx" style="display: block; padding: 0 10px">                         array(
</span><span class="cx" style="display: block; padding: 0 10px">                                self::$my_category_id,
</span><span class="cx" style="display: block; padding: 0 10px">                        ),
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -682,8 +682,8 @@
</span><span class="cx" style="display: block; padding: 0 10px">                        )
</span><span class="cx" style="display: block; padding: 0 10px">                );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertEquals( 200, $response->get_status() );
-               $this->assertEqualSets(
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertSame( 200, $response->get_status() );
+               $this->assertSameSets(
</ins><span class="cx" style="display: block; padding: 0 10px">                         array(
</span><span class="cx" style="display: block; padding: 0 10px">                                self::$my_tag_id,
</span><span class="cx" style="display: block; padding: 0 10px">                        ),
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -705,7 +705,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                        )
</span><span class="cx" style="display: block; padding: 0 10px">                );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertEquals( 200, $response->get_status() );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertSame( 200, $response->get_status() );
</ins><span class="cx" style="display: block; padding: 0 10px">                 $this->assertEmpty( $response->get_data() );
</span><span class="cx" style="display: block; padding: 0 10px">        }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -721,7 +721,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                                'type'     => 'post-format',
</span><span class="cx" style="display: block; padding: 0 10px">                        )
</span><span class="cx" style="display: block; padding: 0 10px">                );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertEquals( 200, $response->get_status() );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertSame( 200, $response->get_status() );
</ins><span class="cx" style="display: block; padding: 0 10px">                 $this->assertContains(
</span><span class="cx" style="display: block; padding: 0 10px">                        'Aside',
</span><span class="cx" style="display: block; padding: 0 10px">                        wp_list_pluck( $response->get_data(), 'title' )
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -742,7 +742,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                        )
</span><span class="cx" style="display: block; padding: 0 10px">                );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertEquals( 200, $response->get_status() );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertSame( 200, $response->get_status() );
</ins><span class="cx" style="display: block; padding: 0 10px">                 $this->assertContains(
</span><span class="cx" style="display: block; padding: 0 10px">                        'Aside',
</span><span class="cx" style="display: block; padding: 0 10px">                        wp_list_pluck( $response->get_data(), 'title' )
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -764,7 +764,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                        )
</span><span class="cx" style="display: block; padding: 0 10px">                );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertEquals( 200, $response->get_status() );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertSame( 200, $response->get_status() );
</ins><span class="cx" style="display: block; padding: 0 10px">                 $this->assertEmpty( $response->get_data() );
</span><span class="cx" style="display: block; padding: 0 10px">        }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span></span></pre></div>
<a id="trunktestsphpunittestsrestapirestserverphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/tests/rest-api/rest-server.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/rest-api/rest-server.php        2020-11-09 15:33:51 UTC (rev 49546)
+++ trunk/tests/phpunit/tests/rest-api/rest-server.php  2020-11-09 15:43:14 UTC (rev 49547)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1550,7 +1550,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                $events = $mock_hook->get_events();
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertCount( 1, $events );
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertWPError( $events[0]['args'][0] );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertEquals( 'rest_invalid_handler', $events[0]['args'][0]->get_error_code() );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertSame( 'rest_invalid_handler', $events[0]['args'][0]->get_error_code() );
</ins><span class="cx" style="display: block; padding: 0 10px">         }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">        /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1614,7 +1614,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                $events = $mock_hook->get_events();
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertCount( 1, $events );
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertWPError( $events[0]['args'][0] );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertEquals( 'rest_invalid_param', $events[0]['args'][0]->get_error_code() );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertSame( 'rest_invalid_param', $events[0]['args'][0]->get_error_code() );
</ins><span class="cx" style="display: block; padding: 0 10px">         }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">        /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1653,12 +1653,12 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $response = rest_do_request( $request );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertEquals( 207, $response->get_status() );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertSame( 207, $response->get_status() );
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                if ( $allowed ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                        $this->assertEquals( 'data', $response->get_data()['responses'][0]['body'] );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                 $this->assertSame( 'data', $response->get_data()['responses'][0]['body'] );
</ins><span class="cx" style="display: block; padding: 0 10px">                 } else {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                        $this->assertEquals( 'rest_batch_not_allowed', $response->get_data()['responses'][0]['body']['code'] );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                 $this->assertSame( 'rest_batch_not_allowed', $response->get_data()['responses'][0]['body']['code'] );
</ins><span class="cx" style="display: block; padding: 0 10px">                 }
</span><span class="cx" style="display: block; padding: 0 10px">        }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1723,12 +1723,12 @@
</span><span class="cx" style="display: block; padding: 0 10px">                $response = rest_get_server()->dispatch( $request );
</span><span class="cx" style="display: block; padding: 0 10px">                $data     = $response->get_data();
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertEquals( 207, $response->get_status() );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertSame( 207, $response->get_status() );
</ins><span class="cx" style="display: block; padding: 0 10px">                 $this->assertArrayHasKey( 'failed', $data );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertEquals( 'validation', $data['failed'] );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertSame( 'validation', $data['failed'] );
</ins><span class="cx" style="display: block; padding: 0 10px">                 $this->assertCount( 2, $data['responses'] );
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertNull( $data['responses'][0] );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertEquals( 400, $data['responses'][1]['status'] );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertSame( 400, $data['responses'][1]['status'] );
</ins><span class="cx" style="display: block; padding: 0 10px">                 $this->assertFalse( get_option( 'test_project' ) );
</span><span class="cx" style="display: block; padding: 0 10px">        }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1779,11 +1779,11 @@
</span><span class="cx" style="display: block; padding: 0 10px">                $response = rest_get_server()->dispatch( $request );
</span><span class="cx" style="display: block; padding: 0 10px">                $data     = $response->get_data();
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertEquals( 207, $response->get_status() );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertSame( 207, $response->get_status() );
</ins><span class="cx" style="display: block; padding: 0 10px">                 $this->assertArrayNotHasKey( 'failed', $data );
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertCount( 2, $data['responses'] );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertEquals( 'gutenberg', $data['responses'][0]['body'] );
-               $this->assertEquals( 'WordPress', $data['responses'][1]['body'] );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertSame( 'gutenberg', $data['responses'][0]['body'] );
+               $this->assertSame( 'WordPress', $data['responses'][1]['body'] );
</ins><span class="cx" style="display: block; padding: 0 10px">         }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">        /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1796,12 +1796,12 @@
</span><span class="cx" style="display: block; padding: 0 10px">                        array(
</span><span class="cx" style="display: block; padding: 0 10px">                                'methods'             => array( 'POST', 'DELETE' ),
</span><span class="cx" style="display: block; padding: 0 10px">                                'callback'            => function ( WP_REST_Request $request ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                        $this->assertEquals( 'DELETE', $request->get_method() );
-                                       $this->assertEquals( '/test-ns/v1/test/5', $request->get_route() );
-                                       $this->assertEquals( array( 'id' => '5' ), $request->get_url_params() );
-                                       $this->assertEquals( array( 'query' => 'param' ), $request->get_query_params() );
-                                       $this->assertEquals( array( 'project' => 'gutenberg' ), $request->get_body_params() );
-                                       $this->assertEquals( array( 'my_header' => array( 'my-value' ) ), $request->get_headers() );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                                 $this->assertSame( 'DELETE', $request->get_method() );
+                                       $this->assertSame( '/test-ns/v1/test/5', $request->get_route() );
+                                       $this->assertSame( array( 'id' => '5' ), $request->get_url_params() );
+                                       $this->assertSame( array( 'query' => 'param' ), $request->get_query_params() );
+                                       $this->assertSame( array( 'project' => 'gutenberg' ), $request->get_body_params() );
+                                       $this->assertSame( array( 'my_header' => array( 'my-value' ) ), $request->get_headers() );
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                                        return new WP_REST_Response( 'test' );
</span><span class="cx" style="display: block; padding: 0 10px">                                },
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1830,8 +1830,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $response = rest_get_server()->dispatch( $request );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertEquals( 207, $response->get_status() );
-               $this->assertEquals( 'test', $response->get_data()['responses'][0]['body'] );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertSame( 207, $response->get_status() );
+               $this->assertSame( 'test', $response->get_data()['responses'][0]['body'] );
</ins><span class="cx" style="display: block; padding: 0 10px">         }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">        /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1883,12 +1883,12 @@
</span><span class="cx" style="display: block; padding: 0 10px">                $response = rest_get_server()->dispatch( $request );
</span><span class="cx" style="display: block; padding: 0 10px">                $data     = $response->get_data();
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertEquals( 207, $response->get_status() );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertSame( 207, $response->get_status() );
</ins><span class="cx" style="display: block; padding: 0 10px">                 $this->assertArrayNotHasKey( 'failed', $data );
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertCount( 2, $data['responses'] );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertEquals( 'gutenberg', $data['responses'][0]['body'] );
-               $this->assertEquals( 400, $data['responses'][1]['status'] );
-               $this->assertEquals( 'gutenberg', get_option( 'test_project' ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertSame( 'gutenberg', $data['responses'][0]['body'] );
+               $this->assertSame( 400, $data['responses'][1]['status'] );
+               $this->assertSame( 'gutenberg', get_option( 'test_project' ) );
</ins><span class="cx" style="display: block; padding: 0 10px">         }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1928,7 +1928,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $response = rest_get_server()->dispatch( $request );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertEquals( 400, $response->get_status() );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertSame( 400, $response->get_status() );
</ins><span class="cx" style="display: block; padding: 0 10px">         }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">        /**
</span></span></pre></div>
<a id="trunktestsphpunittestsrestapirestsitehealthcontrollerphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/tests/rest-api/rest-site-health-controller.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/rest-api/rest-site-health-controller.php        2020-11-09 15:33:51 UTC (rev 49546)
+++ trunk/tests/phpunit/tests/rest-api/rest-site-health-controller.php  2020-11-09 15:43:14 UTC (rev 49547)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -97,6 +97,6 @@
</span><span class="cx" style="display: block; padding: 0 10px">        public function test() {
</span><span class="cx" style="display: block; padding: 0 10px">                wp_set_current_user( self::$admin );
</span><span class="cx" style="display: block; padding: 0 10px">                $response = rest_do_request( '/wp-site-health/v1/tests/dotorg-communication' );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertEquals( 'dotorg_communication', $response->get_data()['test'] );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertSame( 'dotorg_communication', $response->get_data()['test'] );
</ins><span class="cx" style="display: block; padding: 0 10px">         }
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span></span></pre>
</div>
</div>

</body>
</html>