<!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>[51079] trunk/tests/phpunit/tests: 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/51079">51079</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/51079","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>2021-06-07 11:16:29 +0000 (Mon, 07 Jun 2021)</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/50380">[50380]</a>, <a href="https://core.trac.wordpress.org/changeset/50959">[50959]</a>, <a href="https://core.trac.wordpress.org/changeset/50960">[50960]</a>, <a href="https://core.trac.wordpress.org/changeset/50973">[50973]</a>, <a href="https://core.trac.wordpress.org/changeset/50993">[50993]</a>, <a href="https://core.trac.wordpress.org/changeset/51003">[51003]</a>, <a href="https://core.trac.wordpress.org/changeset/51051">[51051]</a>, <a href="https://core.trac.wordpress.org/changeset/51054">[51054]</a>.

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

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunktestsphpunittestsblocktemplateutilsphp">trunk/tests/phpunit/tests/block-template-utils.php</a></li>
<li><a href="#trunktestsphpunittestsblocktemplatephp">trunk/tests/phpunit/tests/block-template.php</a></li>
<li><a href="#trunktestsphpunittestsbookmarkgetBookmarkphp">trunk/tests/phpunit/tests/bookmark/getBookmark.php</a></li>
<li><a href="#trunktestsphpunittestspostphp">trunk/tests/phpunit/tests/post.php</a></li>
<li><a href="#trunktestsphpunittestsrestapirestsidebarscontrollerphp">trunk/tests/phpunit/tests/rest-api/rest-sidebars-controller.php</a></li>
<li><a href="#trunktestsphpunittestsrestapiresttemplatescontrollerphp">trunk/tests/phpunit/tests/rest-api/rest-templates-controller.php</a></li>
<li><a href="#trunktestsphpunittestsrestapirestwidgettypescontrollerphp">trunk/tests/phpunit/tests/rest-api/rest-widget-types-controller.php</a></li>
<li><a href="#trunktestsphpunittestsrestapirestwidgetscontrollerphp">trunk/tests/phpunit/tests/rest-api/rest-widgets-controller.php</a></li>
<li><a href="#trunktestsphpunitteststhemewpThemeJsonphp">trunk/tests/phpunit/tests/theme/wpThemeJson.php</a></li>
<li><a href="#trunktestsphpunitteststhemewpThemeJsonResolverphp">trunk/tests/phpunit/tests/theme/wpThemeJsonResolver.php</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunktestsphpunittestsblocktemplateutilsphp"></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/block-template-utils.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/block-template-utils.php        2021-06-06 14:04:52 UTC (rev 51078)
+++ trunk/tests/phpunit/tests/block-template-utils.php  2021-06-07 11:16:29 UTC (rev 51079)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -40,14 +40,14 @@
</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">                $this->assertNotWPError( $template );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertEquals( get_stylesheet() . '//my_template', $template->id );
-               $this->assertEquals( get_stylesheet(), $template->theme );
-               $this->assertEquals( 'my_template', $template->slug );
-               $this->assertEquals( 'publish', $template->status );
-               $this->assertEquals( 'custom', $template->source );
-               $this->assertEquals( 'My Template', $template->title );
-               $this->assertEquals( 'Description of my template', $template->description );
-               $this->assertEquals( 'wp_template', $template->type );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertSame( get_stylesheet() . '//my_template', $template->id );
+               $this->assertSame( get_stylesheet(), $template->theme );
+               $this->assertSame( 'my_template', $template->slug );
+               $this->assertSame( 'publish', $template->status );
+               $this->assertSame( 'custom', $template->source );
+               $this->assertSame( 'My Template', $template->title );
+               $this->assertSame( 'Description of my template', $template->description );
+               $this->assertSame( 'wp_template', $template->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">@@ -56,12 +56,12 @@
</span><span class="cx" style="display: block; padding: 0 10px">        function test_get_block_template_from_post() {
</span><span class="cx" style="display: block; padding: 0 10px">                $id       = get_stylesheet() . '//' . 'my_template';
</span><span class="cx" style="display: block; padding: 0 10px">                $template = get_block_template( $id, 'wp_template' );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertEquals( $id, $template->id );
-               $this->assertEquals( get_stylesheet(), $template->theme );
-               $this->assertEquals( 'my_template', $template->slug );
-               $this->assertEquals( 'publish', $template->status );
-               $this->assertEquals( 'custom', $template->source );
-               $this->assertEquals( 'wp_template', $template->type );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertSame( $id, $template->id );
+               $this->assertSame( get_stylesheet(), $template->theme );
+               $this->assertSame( 'my_template', $template->slug );
+               $this->assertSame( 'publish', $template->status );
+               $this->assertSame( 'custom', $template->source );
+               $this->assertSame( 'wp_template', $template->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">@@ -87,11 +87,11 @@
</span><span class="cx" style="display: block; padding: 0 10px">                // Filter by slug.
</span><span class="cx" style="display: block; padding: 0 10px">                $templates    = get_block_templates( array( 'slug__in' => array( 'my_template' ) ), 'wp_template' );
</span><span class="cx" style="display: block; padding: 0 10px">                $template_ids = get_template_ids( $templates );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertEquals( array( get_stylesheet() . '//' . 'my_template' ), $template_ids );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertSame( array( get_stylesheet() . '//' . 'my_template' ), $template_ids );
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                // Filter by CPT ID.
</span><span class="cx" style="display: block; padding: 0 10px">                $templates    = get_block_templates( array( 'wp_id' => self::$post->ID ), 'wp_template' );
</span><span class="cx" style="display: block; padding: 0 10px">                $template_ids = get_template_ids( $templates );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertEquals( array( get_stylesheet() . '//' . 'my_template' ), $template_ids );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertSame( array( get_stylesheet() . '//' . 'my_template' ), $template_ids );
</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="trunktestsphpunittestsblocktemplatephp"></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/block-template.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/block-template.php      2021-06-06 14:04:52 UTC (rev 51078)
+++ trunk/tests/phpunit/tests/block-template.php        2021-06-07 11:16:29 UTC (rev 51079)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -54,7 +54,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                        'page.php',
</span><span class="cx" style="display: block; padding: 0 10px">                );
</span><span class="cx" style="display: block; padding: 0 10px">                $resolved_template_path    = locate_block_template( $custom_page_template_path, $type, $templates );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertEquals( $custom_page_template_path, $resolved_template_path );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertSame( $custom_page_template_path, $resolved_template_path );
</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">@@ -73,8 +73,8 @@
</span><span class="cx" style="display: block; padding: 0 10px">                        'page.php',
</span><span class="cx" style="display: block; padding: 0 10px">                );
</span><span class="cx" style="display: block; padding: 0 10px">                $resolved_template_path     = locate_block_template( $page_template_path, $type, $templates );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertEquals( self::$template_canvas_path, $resolved_template_path );
-               $this->assertEquals( self::$post->post_content, $_wp_current_template_content );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertSame( self::$template_canvas_path, $resolved_template_path );
+               $this->assertSame( self::$post->post_content, $_wp_current_template_content );
</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">@@ -82,6 +82,6 @@
</span><span class="cx" style="display: block; padding: 0 10px">         */
</span><span class="cx" style="display: block; padding: 0 10px">        function test_template_remains_unchanged_if_templates_array_is_empty() {
</span><span class="cx" style="display: block; padding: 0 10px">                $resolved_template_path = locate_block_template( '', 'search', array() );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertEquals( '', $resolved_template_path );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertSame( '', $resolved_template_path );
</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="trunktestsphpunittestsbookmarkgetBookmarkphp"></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/bookmark/getBookmark.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/bookmark/getBookmark.php        2021-06-06 14:04:52 UTC (rev 51078)
+++ trunk/tests/phpunit/tests/bookmark/getBookmark.php  2021-06-07 11:16:29 UTC (rev 51079)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -228,8 +228,8 @@
</span><span class="cx" style="display: block; padding: 0 10px">                $actual_bookmark = get_bookmark( ...$args );
</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">-                 * For non-array output type, use assetEquals. Why? The object pulled from cache will have the same
-                * property values but will be a different object than the expected object.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+          * For non-array output type, use assertEquals(). Why? The object pulled from the cache
+                * will have the same property values but will be a different object than the expected object.
</ins><span class="cx" style="display: block; padding: 0 10px">                  */
</span><span class="cx" style="display: block; padding: 0 10px">                if ( is_object( $expected ) ) {
</span><span class="cx" style="display: block; padding: 0 10px">                        $this->assertEquals( $expected, $actual_bookmark );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -286,8 +286,8 @@
</span><span class="cx" style="display: block; padding: 0 10px">                $actual_bookmark = get_bookmark( ...$args );
</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">-                 * For non-array output type, use assetEquals. Why? The object pulled from the database will have the same
-                * property values but will be a different object than the expected object.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+          * For non-array output type, use assertEquals(). Why? The object pulled from the database
+                * will have the same property values but will be a different object than the expected object.
</ins><span class="cx" style="display: block; padding: 0 10px">                  */
</span><span class="cx" style="display: block; padding: 0 10px">                if ( is_object( $expected ) ) {
</span><span class="cx" style="display: block; padding: 0 10px">                        $this->assertEquals( $expected, $actual_bookmark );
</span></span></pre></div>
<a id="trunktestsphpunittestspostphp"></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/post.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/post.php        2021-06-06 14:04:52 UTC (rev 51078)
+++ trunk/tests/phpunit/tests/post.php  2021-06-07 11:16:29 UTC (rev 51079)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1782,7 +1782,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">        function test_stick_post_with_duplicate_post_id_does_not_update_option() {
</span><span class="cx" style="display: block; padding: 0 10px">                update_option( 'sticky_posts', array( 1, 2, 2 ) );
</span><span class="cx" style="display: block; padding: 0 10px">                stick_post( 2 );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertEquals( array( 1, 2, 2 ), get_option( 'sticky_posts' ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertSameSets( array( 1, 2, 2 ), get_option( 'sticky_posts' ) );
</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">@@ -1794,6 +1794,6 @@
</span><span class="cx" style="display: block; padding: 0 10px">        function test_unstick_post_with_non_sticky_post_id_does_not_update_option() {
</span><span class="cx" style="display: block; padding: 0 10px">                update_option( 'sticky_posts', array( 1, 2, 2 ) );
</span><span class="cx" style="display: block; padding: 0 10px">                unstick_post( 3 );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertEquals( array( 1, 2, 2 ), get_option( 'sticky_posts' ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertSameSets( array( 1, 2, 2 ), get_option( 'sticky_posts' ) );
</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="trunktestsphpunittestsrestapirestsidebarscontrollerphp"></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-sidebars-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-sidebars-controller.php   2021-06-06 14:04:52 UTC (rev 51078)
+++ trunk/tests/phpunit/tests/rest-api/rest-sidebars-controller.php     2021-06-07 11:16:29 UTC (rev 51079)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -132,7 +132,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">                $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( array(), $data );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertSame( array(), $data );
</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">@@ -170,19 +170,19 @@
</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">                $data     = $this->remove_links( $data );
</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(
</span><span class="cx" style="display: block; padding: 0 10px">                                array(
</span><span class="cx" style="display: block; padding: 0 10px">                                        'id'            => 'sidebar-1',
</span><span class="cx" style="display: block; padding: 0 10px">                                        'name'          => 'Test sidebar',
</span><span class="cx" style="display: block; padding: 0 10px">                                        'description'   => '',
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                        'status'        => 'active',
-                                       'widgets'       => array(),
</del><span class="cx" style="display: block; padding: 0 10px">                                         'class'         => '',
</span><span class="cx" style="display: block; padding: 0 10px">                                        'before_widget' => '',
</span><span class="cx" style="display: block; padding: 0 10px">                                        'after_widget'  => '',
</span><span class="cx" style="display: block; padding: 0 10px">                                        'before_title'  => '',
</span><span class="cx" style="display: block; padding: 0 10px">                                        'after_title'   => '',
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                                        'status'        => 'active',
+                                       'widgets'       => array(),
</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">                        $data
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -219,22 +219,22 @@
</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">                $data     = $this->remove_links( $data );
</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(
</span><span class="cx" style="display: block; padding: 0 10px">                                array(
</span><span class="cx" style="display: block; padding: 0 10px">                                        'id'            => 'sidebar-1',
</span><span class="cx" style="display: block; padding: 0 10px">                                        'name'          => 'Test sidebar',
</span><span class="cx" style="display: block; padding: 0 10px">                                        'description'   => '',
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                                        'class'         => '',
+                                       'before_widget' => '',
+                                       'after_widget'  => '',
+                                       'before_title'  => '',
+                                       'after_title'   => '',
</ins><span class="cx" style="display: block; padding: 0 10px">                                         'status'        => 'active',
</span><span class="cx" style="display: block; padding: 0 10px">                                        'widgets'       => array(
</span><span class="cx" style="display: block; padding: 0 10px">                                                'text-1',
</span><span class="cx" style="display: block; padding: 0 10px">                                                'rss-1',
</span><span class="cx" style="display: block; padding: 0 10px">                                        ),
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                        'class'         => '',
-                                       'before_widget' => '',
-                                       'after_widget'  => '',
-                                       'before_title'  => '',
-                                       'after_title'   => '',
</del><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">                        $data
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -256,18 +256,18 @@
</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">                $data     = $this->remove_links( $data );
</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(
</span><span class="cx" style="display: block; padding: 0 10px">                                'id'            => 'sidebar-1',
</span><span class="cx" style="display: block; padding: 0 10px">                                'name'          => 'Test sidebar',
</span><span class="cx" style="display: block; padding: 0 10px">                                'description'   => '',
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                'status'        => 'active',
-                               'widgets'       => array(),
</del><span class="cx" style="display: block; padding: 0 10px">                                 'class'         => '',
</span><span class="cx" style="display: block; padding: 0 10px">                                'before_widget' => '',
</span><span class="cx" style="display: block; padding: 0 10px">                                'after_widget'  => '',
</span><span class="cx" style="display: block; padding: 0 10px">                                'before_title'  => '',
</span><span class="cx" style="display: block; padding: 0 10px">                                'after_title'   => '',
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                                'status'        => 'active',
+                               'widgets'       => array(),
</ins><span class="cx" style="display: block; padding: 0 10px">                         ),
</span><span class="cx" style="display: block; padding: 0 10px">                        $data
</span><span class="cx" style="display: block; padding: 0 10px">                );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -358,21 +358,21 @@
</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">                $data     = $this->remove_links( $data );
</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(
</span><span class="cx" style="display: block; padding: 0 10px">                                'id'            => 'sidebar-1',
</span><span class="cx" style="display: block; padding: 0 10px">                                'name'          => 'Test sidebar',
</span><span class="cx" style="display: block; padding: 0 10px">                                'description'   => '',
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                                'class'         => '',
+                               'before_widget' => '',
+                               'after_widget'  => '',
+                               'before_title'  => '',
+                               'after_title'   => '',
</ins><span class="cx" style="display: block; padding: 0 10px">                                 'status'        => 'active',
</span><span class="cx" style="display: block; padding: 0 10px">                                'widgets'       => array(
</span><span class="cx" style="display: block; padding: 0 10px">                                        'text-1',
</span><span class="cx" style="display: block; padding: 0 10px">                                        'text-2',
</span><span class="cx" style="display: block; padding: 0 10px">                                ),
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                'class'         => '',
-                               'before_widget' => '',
-                               'after_widget'  => '',
-                               'before_title'  => '',
-                               'after_title'   => '',
</del><span class="cx" style="display: block; padding: 0 10px">                         ),
</span><span class="cx" style="display: block; padding: 0 10px">                        $data
</span><span class="cx" style="display: block; padding: 0 10px">                );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -501,35 +501,35 @@
</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">                $data     = $this->remove_links( $data );
</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(
</span><span class="cx" style="display: block; padding: 0 10px">                                array(
</span><span class="cx" style="display: block; padding: 0 10px">                                        'id'            => 'sidebar-1',
</span><span class="cx" style="display: block; padding: 0 10px">                                        'name'          => 'Test sidebar',
</span><span class="cx" style="display: block; padding: 0 10px">                                        'description'   => '',
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                        'status'        => 'active',
-                                       'widgets'       => array(
-                                               'text-1',
-                                       ),
</del><span class="cx" style="display: block; padding: 0 10px">                                         'class'         => '',
</span><span class="cx" style="display: block; padding: 0 10px">                                        'before_widget' => '',
</span><span class="cx" style="display: block; padding: 0 10px">                                        'after_widget'  => '',
</span><span class="cx" style="display: block; padding: 0 10px">                                        'before_title'  => '',
</span><span class="cx" style="display: block; padding: 0 10px">                                        'after_title'   => '',
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                                        'status'        => 'active',
+                                       'widgets'       => array(
+                                               'text-1',
+                                       ),
</ins><span class="cx" style="display: block; padding: 0 10px">                                 ),
</span><span class="cx" style="display: block; padding: 0 10px">                                array(
</span><span class="cx" style="display: block; padding: 0 10px">                                        'id'            => 'wp_inactive_widgets',
</span><span class="cx" style="display: block; padding: 0 10px">                                        'name'          => 'Inactive widgets',
</span><span class="cx" style="display: block; padding: 0 10px">                                        'description'   => '',
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                        'status'        => 'inactive',
-                                       'widgets'       => array(
-                                               'rss-1',
-                                       ),
</del><span class="cx" style="display: block; padding: 0 10px">                                         'class'         => '',
</span><span class="cx" style="display: block; padding: 0 10px">                                        'before_widget' => '',
</span><span class="cx" style="display: block; padding: 0 10px">                                        'after_widget'  => '',
</span><span class="cx" style="display: block; padding: 0 10px">                                        'before_title'  => '',
</span><span class="cx" style="display: block; padding: 0 10px">                                        'after_title'   => '',
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                                        'status'        => 'inactive',
+                                       'widgets'       => array(
+                                               'rss-1',
+                                       ),
</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">                        $data
</span></span></pre></div>
<a id="trunktestsphpunittestsrestapiresttemplatescontrollerphp"></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-templates-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-templates-controller.php  2021-06-06 14:04:52 UTC (rev 51078)
+++ trunk/tests/phpunit/tests/rest-api/rest-templates-controller.php    2021-06-07 11:16:29 UTC (rev 51079)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -80,19 +80,19 @@
</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(
</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(
</span><span class="cx" style="display: block; padding: 0 10px">                                'id'             => 'default//my_template',
</span><span class="cx" style="display: block; padding: 0 10px">                                'theme'          => 'default',
</span><span class="cx" style="display: block; padding: 0 10px">                                'slug'           => 'my_template',
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                                'source'         => 'custom',
+                               'type'           => 'wp_template',
+                               'description'    => 'Description of my template.',
</ins><span class="cx" style="display: block; padding: 0 10px">                                 'title'          => array(
</span><span class="cx" style="display: block; padding: 0 10px">                                        'raw'      => 'My Template',
</span><span class="cx" style="display: block; padding: 0 10px">                                        'rendered' => 'My Template',
</span><span class="cx" style="display: block; padding: 0 10px">                                ),
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                'description'    => 'Description of my template.',
</del><span class="cx" style="display: block; padding: 0 10px">                                 'status'         => 'publish',
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                'source'         => 'custom',
-                               'type'           => 'wp_template',
</del><span class="cx" style="display: block; padding: 0 10px">                                 'wp_id'          => self::$post->ID,
</span><span class="cx" style="display: block; padding: 0 10px">                                'has_theme_file' => false,
</span><span class="cx" style="display: block; padding: 0 10px">                        ),
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -108,19 +108,19 @@
</span><span class="cx" style="display: block; padding: 0 10px">                unset( $data['content'] );
</span><span class="cx" style="display: block; padding: 0 10px">                unset( $data['_links'] );
</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(
</span><span class="cx" style="display: block; padding: 0 10px">                                'id'             => 'default//my_template',
</span><span class="cx" style="display: block; padding: 0 10px">                                'theme'          => 'default',
</span><span class="cx" style="display: block; padding: 0 10px">                                'slug'           => 'my_template',
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                                'source'         => 'custom',
+                               'type'           => 'wp_template',
+                               'description'    => 'Description of my template.',
</ins><span class="cx" style="display: block; padding: 0 10px">                                 'title'          => array(
</span><span class="cx" style="display: block; padding: 0 10px">                                        'raw'      => 'My Template',
</span><span class="cx" style="display: block; padding: 0 10px">                                        'rendered' => 'My Template',
</span><span class="cx" style="display: block; padding: 0 10px">                                ),
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                'description'    => 'Description of my template.',
</del><span class="cx" style="display: block; padding: 0 10px">                                 'status'         => 'publish',
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                'source'         => 'custom',
-                               'type'           => 'wp_template',
</del><span class="cx" style="display: block; padding: 0 10px">                                 'wp_id'          => self::$post->ID,
</span><span class="cx" style="display: block; padding: 0 10px">                                'has_theme_file' => false,
</span><span class="cx" style="display: block; padding: 0 10px">                        ),
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -134,8 +134,8 @@
</span><span class="cx" style="display: block; padding: 0 10px">                $request->set_body_params(
</span><span class="cx" style="display: block; padding: 0 10px">                        array(
</span><span class="cx" style="display: block; padding: 0 10px">                                'slug'        => 'my_custom_template',
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                                'description' => 'Just a description',
</ins><span class="cx" style="display: block; padding: 0 10px">                                 'title'       => 'My Template',
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                'description' => 'Just a description',
</del><span class="cx" style="display: block; padding: 0 10px">                                 'content'     => 'Content',
</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">@@ -144,22 +144,22 @@
</span><span class="cx" style="display: block; padding: 0 10px">                unset( $data['_links'] );
</span><span class="cx" style="display: block; padding: 0 10px">                unset( $data['wp_id'] );
</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(
</span><span class="cx" style="display: block; padding: 0 10px">                                'id'             => 'default//my_custom_template',
</span><span class="cx" style="display: block; padding: 0 10px">                                'theme'          => 'default',
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                                'content'        => array(
+                                       'raw' => 'Content',
+                               ),
</ins><span class="cx" style="display: block; padding: 0 10px">                                 'slug'           => 'my_custom_template',
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                                'source'         => 'custom',
+                               'type'           => 'wp_template',
+                               'description'    => 'Just a description',
</ins><span class="cx" style="display: block; padding: 0 10px">                                 'title'          => array(
</span><span class="cx" style="display: block; padding: 0 10px">                                        'raw'      => 'My Template',
</span><span class="cx" style="display: block; padding: 0 10px">                                        'rendered' => 'My Template',
</span><span class="cx" style="display: block; padding: 0 10px">                                ),
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                'description'    => 'Just a description',
</del><span class="cx" style="display: block; padding: 0 10px">                                 'status'         => 'publish',
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                'source'         => 'custom',
-                               'type'           => 'wp_template',
-                               'content'        => array(
-                                       'raw' => 'Content',
-                               ),
</del><span class="cx" style="display: block; padding: 0 10px">                                 'has_theme_file' => false,
</span><span class="cx" style="display: block; padding: 0 10px">                        ),
</span><span class="cx" style="display: block; padding: 0 10px">                        $data
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -176,8 +176,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">                $data     = $response->get_data();
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertEquals( 'My new Index Title', $data['title']['raw'] );
-               $this->assertEquals( 'custom', $data['source'] );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertSame( 'My new Index Title', $data['title']['raw'] );
+               $this->assertSame( 'custom', $data['source'] );
</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_delete_item() {
</span></span></pre></div>
<a id="trunktestsphpunittestsrestapirestwidgettypescontrollerphp"></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-widget-types-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-widget-types-controller.php       2021-06-06 14:04:52 UTC (rev 51078)
+++ trunk/tests/phpunit/tests/rest-api/rest-widget-types-controller.php 2021-06-07 11:16:29 UTC (rev 51079)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -307,7 +307,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                $request  = new WP_REST_Request( 'POST', '/wp/v2/widget-types/search/encode' );
</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><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">                         "<p>\n" .
</span><span class="cx" style="display: block; padding: 0 10px">                        "\t\t\t<label for=\"widget-search--1-title\">Title:</label>\n" .
</span><span class="cx" style="display: block; padding: 0 10px">                        "\t\t\t<input class=\"widefat\" id=\"widget-search--1-title\" name=\"widget-search[-1][title]\" type=\"text\" value=\"\" />\n" .
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -343,7 +343,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                $request->set_param( 'number', 8 );
</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><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">                         "<p>\n" .
</span><span class="cx" style="display: block; padding: 0 10px">                        "\t\t\t<label for=\"widget-search-8-title\">Title:</label>\n" .
</span><span class="cx" style="display: block; padding: 0 10px">                        "\t\t\t<input class=\"widefat\" id=\"widget-search-8-title\" name=\"widget-search[8][title]\" type=\"text\" value=\"\" />\n" .
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -385,7 +385,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">                $data     = $response->get_data();
</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">                         "<p>\n" .
</span><span class="cx" style="display: block; padding: 0 10px">                        "\t\t\t<label for=\"widget-search--1-title\">Title:</label>\n" .
</span><span class="cx" style="display: block; padding: 0 10px">                        "\t\t\t<input class=\"widefat\" id=\"widget-search--1-title\" name=\"widget-search[-1][title]\" type=\"text\" value=\"Test title\" />\n" .
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -421,7 +421,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                $request->set_param( 'form_data', 'widget-search[-1][title]=Updated+title' );
</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><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">                         "<p>\n" .
</span><span class="cx" style="display: block; padding: 0 10px">                        "\t\t\t<label for=\"widget-search--1-title\">Title:</label>\n" .
</span><span class="cx" style="display: block; padding: 0 10px">                        "\t\t\t<input class=\"widefat\" id=\"widget-search--1-title\" name=\"widget-search[-1][title]\" type=\"text\" value=\"Updated title\" />\n" .
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -465,7 +465,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">                $data     = $response->get_data();
</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">                         "<p>\n" .
</span><span class="cx" style="display: block; padding: 0 10px">                        "\t\t\t<label for=\"widget-search--1-title\">Title:</label>\n" .
</span><span class="cx" style="display: block; padding: 0 10px">                        "\t\t\t<input class=\"widefat\" id=\"widget-search--1-title\" name=\"widget-search[-1][title]\" type=\"text\" value=\"Test title\" />\n" .
</span></span></pre></div>
<a id="trunktestsphpunittestsrestapirestwidgetscontrollerphp"></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-widgets-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-widgets-controller.php    2021-06-06 14:04:52 UTC (rev 51078)
+++ trunk/tests/phpunit/tests/rest-api/rest-widgets-controller.php      2021-06-07 11:16:29 UTC (rev 51079)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -211,7 +211,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">                $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( array(), $data );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertSame( array(), $data );
</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">@@ -276,6 +276,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                        array(
</span><span class="cx" style="display: block; padding: 0 10px">                                array(
</span><span class="cx" style="display: block; padding: 0 10px">                                        'id'       => 'block-1',
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                                        'id_base'  => 'block',
</ins><span class="cx" style="display: block; padding: 0 10px">                                         'sidebar'  => 'sidebar-1',
</span><span class="cx" style="display: block; padding: 0 10px">                                        'instance' => array(
</span><span class="cx" style="display: block; padding: 0 10px">                                                'encoded' => base64_encode(
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -296,11 +297,11 @@
</span><span class="cx" style="display: block; padding: 0 10px">                                                        'content' => $block_content,
</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">-                                        'id_base'  => 'block',
</del><span class="cx" style="display: block; padding: 0 10px">                                         'rendered' => '<p>Block test</p>',
</span><span class="cx" style="display: block; padding: 0 10px">                                ),
</span><span class="cx" style="display: block; padding: 0 10px">                                array(
</span><span class="cx" style="display: block; padding: 0 10px">                                        'id'       => 'rss-1',
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                                        'id_base'  => 'rss',
</ins><span class="cx" style="display: block; padding: 0 10px">                                         'sidebar'  => 'sidebar-1',
</span><span class="cx" style="display: block; padding: 0 10px">                                        'instance' => array(
</span><span class="cx" style="display: block; padding: 0 10px">                                                'encoded' => base64_encode(
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -320,14 +321,13 @@
</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">-                                        'id_base'  => 'rss',
</del><span class="cx" style="display: block; padding: 0 10px">                                         'rendered' => '<a class="rsswidget" href="https://wordpress.org/news/feed"><img class="rss-widget-icon" style="border:0" width="14" height="14" src="http://example.org/wp-includes/images/rss.png" alt="RSS" /></a> <a class="rsswidget" href="https://wordpress.org/news">RSS test</a><ul><li><a class=\'rsswidget\' href=\'https://wordpress.org/news/2020/12/introducing-learn-wordpress/\'>Introducing Learn WordPress</a></li><li><a class=\'rsswidget\' href=\'https://wordpress.org/news/2020/12/simone/\'>WordPress 5.6 “Simone”</a></li><li><a class=\'rsswidget\' href=\'https://wordpress.org/news/2020/12/state-of-the-word-2020/\'>State of the Word 2020</a></li><li><a class=\'rsswidget\' href=\'https://wordpre
 ss.org/news/2020/12/the-month-in-wordpress-november-2020/\'>The Month in WordPress: November 2020</a></li><li><a class=\'rsswidget\' href=\'https://wordpress.org/news/2020/12/wordpress-5-6-release-candidate-2/\'>WordPress 5.6 Release Candidate 2</a></li><li><a class=\'rsswidget\' href=\'https://wordpress.org/news/2020/11/wordpress-5-6-release-candidate/\'>WordPress 5.6 Release Candidate</a></li><li><a class=\'rsswidget\' href=\'https://wordpress.org/news/2020/11/wordpress-5-6-beta-4/\'>WordPress 5.6 Beta 4</a></li><li><a class=\'rsswidget\' href=\'https://wordpress.org/news/2020/11/wordpress-5-6-beta-3/\'>WordPress 5.6 Beta 3</a></li><li><a class=\'rsswidget\' href=\'https://wordpress.org/news/2020/11/the-month-in-wordpress-october-2020/\'>The Month in WordPress: October 2020</a></li><li><a class=\'rsswidget\' href=\'https://wordpress.org/ne
 ws/2020/10/wordpress-5-5-3-maintenance-release/\'>WordPress 5.5.3 Maintenance Release</a></li></ul>',
</span><span class="cx" style="display: block; padding: 0 10px">                                ),
</span><span class="cx" style="display: block; padding: 0 10px">                                array(
</span><span class="cx" style="display: block; padding: 0 10px">                                        'id'       => 'testwidget',
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                                        'id_base'  => 'testwidget',
</ins><span class="cx" style="display: block; padding: 0 10px">                                         'sidebar'  => 'sidebar-1',
</span><span class="cx" style="display: block; padding: 0 10px">                                        'instance' => null,
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                        'id_base'  => 'testwidget',
</del><span class="cx" style="display: block; padding: 0 10px">                                         'rendered' => '<h1>Default id</h1><span>Default text</span>',
</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">@@ -385,6 +385,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                        array(
</span><span class="cx" style="display: block; padding: 0 10px">                                array(
</span><span class="cx" style="display: block; padding: 0 10px">                                        'id'            => 'text-1',
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                                        'id_base'       => 'text',
</ins><span class="cx" style="display: block; padding: 0 10px">                                         'sidebar'       => 'sidebar-1',
</span><span class="cx" style="display: block; padding: 0 10px">                                        'instance'      => array(
</span><span class="cx" style="display: block; padding: 0 10px">                                                'encoded' => base64_encode(
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -405,7 +406,6 @@
</span><span class="cx" style="display: block; padding: 0 10px">                                                        'text' => 'Custom text test',
</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">-                                        'id_base'       => 'text',
</del><span class="cx" style="display: block; padding: 0 10px">                                         'rendered'      => '<div class="textwidget">Custom text test</div>',
</span><span class="cx" style="display: block; padding: 0 10px">                                        'rendered_form' => '<input id="widget-text-1-title" name="widget-text[1][title]" class="title sync-input" type="hidden" value="">' . "\n" .
</span><span class="cx" style="display: block; padding: 0 10px">                                                                        '                       <textarea id="widget-text-1-text" name="widget-text[1][text]" class="text sync-input" hidden>Custom text test</textarea>' . "\n" .
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -414,11 +414,11 @@
</span><span class="cx" style="display: block; padding: 0 10px">                                ),
</span><span class="cx" style="display: block; padding: 0 10px">                                array(
</span><span class="cx" style="display: block; padding: 0 10px">                                        'id'            => 'testwidget',
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                                        'id_base'       => 'testwidget',
</ins><span class="cx" style="display: block; padding: 0 10px">                                         'sidebar'       => 'sidebar-1',
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                        'instance'      => null,
-                                       'id_base'       => 'testwidget',
</del><span class="cx" style="display: block; padding: 0 10px">                                         'rendered'      => '<h1>Default id</h1><span>Default text</span>',
</span><span class="cx" style="display: block; padding: 0 10px">                                        'rendered_form' => 'WP test widget form',
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                                        'instance'      => null,
</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">                        $data
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -450,6 +450,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertEqualSets(
</span><span class="cx" style="display: block; padding: 0 10px">                        array(
</span><span class="cx" style="display: block; padding: 0 10px">                                'id'       => 'text-1',
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                                'id_base'  => 'text',
</ins><span class="cx" style="display: block; padding: 0 10px">                                 'sidebar'  => 'sidebar-1',
</span><span class="cx" style="display: block; padding: 0 10px">                                'instance' => array(
</span><span class="cx" style="display: block; padding: 0 10px">                                        'encoded' => base64_encode(
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -470,7 +471,6 @@
</span><span class="cx" style="display: block; padding: 0 10px">                                                'text' => 'Custom text test',
</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">-                                'id_base'  => 'text',
</del><span class="cx" style="display: block; padding: 0 10px">                                 'rendered' => '<div class="textwidget">Custom text test</div>',
</span><span class="cx" style="display: block; padding: 0 10px">                        ),
</span><span class="cx" style="display: block; padding: 0 10px">                        $data
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -541,6 +541,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                $request = new WP_REST_Request( 'POST', '/wp/v2/widgets' );
</span><span class="cx" style="display: block; padding: 0 10px">                $request->set_body_params(
</span><span class="cx" style="display: block; padding: 0 10px">                        array(
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                                'id_base'  => 'text',
</ins><span class="cx" style="display: block; padding: 0 10px">                                 'sidebar'  => 'sidebar-1',
</span><span class="cx" style="display: block; padding: 0 10px">                                'instance' => array(
</span><span class="cx" style="display: block; padding: 0 10px">                                        'encoded' => base64_encode(
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -558,13 +559,12 @@
</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">-                                'id_base'  => 'text',
</del><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><span class="cx" style="display: block; padding: 0 10px">                $data     = $response->get_data();
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertEquals( 'text-2', $data['id'] );
-               $this->assertEquals( 'sidebar-1', $data['sidebar'] );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertSame( 'text-2', $data['id'] );
+               $this->assertSame( 'sidebar-1', $data['sidebar'] );
</ins><span class="cx" style="display: block; padding: 0 10px">                 $this->assertEqualSets(
</span><span class="cx" style="display: block; padding: 0 10px">                        array(
</span><span class="cx" style="display: block; padding: 0 10px">                                'text'   => 'Updated text test',
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -589,6 +589,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                $request = new WP_REST_Request( 'POST', '/wp/v2/widgets' );
</span><span class="cx" style="display: block; padding: 0 10px">                $request->set_body_params(
</span><span class="cx" style="display: block; padding: 0 10px">                        array(
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                                'id_base'  => 'text',
</ins><span class="cx" style="display: block; padding: 0 10px">                                 'sidebar'  => 'sidebar-1',
</span><span class="cx" style="display: block; padding: 0 10px">                                'instance' => array(
</span><span class="cx" style="display: block; padding: 0 10px">                                        'encoded' => base64_encode(
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -600,7 +601,6 @@
</span><span class="cx" style="display: block; padding: 0 10px">                                        ),
</span><span class="cx" style="display: block; padding: 0 10px">                                        'hash'    => 'badhash',
</span><span class="cx" style="display: block; padding: 0 10px">                                ),
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                'id_base'  => 'text',
</del><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><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -621,9 +621,9 @@
</span><span class="cx" style="display: block; padding: 0 10px">                $request = new WP_REST_Request( 'POST', '/wp/v2/widgets' );
</span><span class="cx" style="display: block; padding: 0 10px">                $request->set_body_params(
</span><span class="cx" style="display: block; padding: 0 10px">                        array(
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                                'id_base'  => 'text',
</ins><span class="cx" style="display: block; padding: 0 10px">                                 'sidebar'  => 'sidebar-1',
</span><span class="cx" style="display: block; padding: 0 10px">                                'instance' => array(),
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                'id_base'  => 'text',
</del><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><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -644,6 +644,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                $request = new WP_REST_Request( 'POST', '/wp/v2/widgets' );
</span><span class="cx" style="display: block; padding: 0 10px">                $request->set_body_params(
</span><span class="cx" style="display: block; padding: 0 10px">                        array(
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                                'id_base'  => 'block',
</ins><span class="cx" style="display: block; padding: 0 10px">                                 'sidebar'  => 'sidebar-1',
</span><span class="cx" style="display: block; padding: 0 10px">                                'instance' => array(
</span><span class="cx" style="display: block; padding: 0 10px">                                        'raw' => array(
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -650,13 +651,12 @@
</span><span class="cx" style="display: block; padding: 0 10px">                                                'content' => '<!-- wp:paragraph --><p>Block test</p><!-- /wp:paragraph -->',
</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">-                                'id_base'  => 'block',
</del><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><span class="cx" style="display: block; padding: 0 10px">                $data     = $response->get_data();
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertEquals( 'block-2', $data['id'] );
-               $this->assertEquals( 'sidebar-1', $data['sidebar'] );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertSame( 'block-2', $data['id'] );
+               $this->assertSame( 'sidebar-1', $data['sidebar'] );
</ins><span class="cx" style="display: block; padding: 0 10px">                 $this->assertEqualSets(
</span><span class="cx" style="display: block; padding: 0 10px">                        array(
</span><span class="cx" style="display: block; padding: 0 10px">                                'content' => '<!-- wp:paragraph --><p>Block test</p><!-- /wp:paragraph -->',
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -683,6 +683,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                $request = new WP_REST_Request( 'POST', '/wp/v2/widgets' );
</span><span class="cx" style="display: block; padding: 0 10px">                $request->set_body_params(
</span><span class="cx" style="display: block; padding: 0 10px">                        array(
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                                'id_base'  => 'text',
</ins><span class="cx" style="display: block; padding: 0 10px">                                 'sidebar'  => 'sidebar-1',
</span><span class="cx" style="display: block; padding: 0 10px">                                'instance' => array(
</span><span class="cx" style="display: block; padding: 0 10px">                                        'raw' => array(
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -689,7 +690,6 @@
</span><span class="cx" style="display: block; padding: 0 10px">                                                'title' => 'Updated text test',
</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">-                                'id_base'  => 'text',
</del><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><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -712,15 +712,15 @@
</span><span class="cx" style="display: block; padding: 0 10px">                $request = new WP_REST_Request( 'POST', '/wp/v2/widgets' );
</span><span class="cx" style="display: block; padding: 0 10px">                $request->set_body_params(
</span><span class="cx" style="display: block; padding: 0 10px">                        array(
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                                'id_base'   => 'text',
</ins><span class="cx" style="display: block; padding: 0 10px">                                 'sidebar'   => 'sidebar-1',
</span><span class="cx" style="display: block; padding: 0 10px">                                'form_data' => 'widget-text[2][text]=Updated+text+test',
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                'id_base'   => 'text',
</del><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><span class="cx" style="display: block; padding: 0 10px">                $data     = $response->get_data();
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertEquals( 'text-2', $data['id'] );
-               $this->assertEquals( 'sidebar-1', $data['sidebar'] );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertSame( 'text-2', $data['id'] );
+               $this->assertSame( 'sidebar-1', $data['sidebar'] );
</ins><span class="cx" style="display: block; padding: 0 10px">                 $this->assertEqualSets(
</span><span class="cx" style="display: block; padding: 0 10px">                        array(
</span><span class="cx" style="display: block; padding: 0 10px">                                'text'   => 'Updated text test',
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -745,17 +745,17 @@
</span><span class="cx" style="display: block; padding: 0 10px">                $request = new WP_REST_Request( 'POST', '/wp/v2/widgets' );
</span><span class="cx" style="display: block; padding: 0 10px">                $request->set_body_params(
</span><span class="cx" style="display: block; padding: 0 10px">                        array(
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                                'id_base'  => 'text',
</ins><span class="cx" style="display: block; padding: 0 10px">                                 'sidebar'  => 'sidebar-1',
</span><span class="cx" style="display: block; padding: 0 10px">                                'instance' => array(
</span><span class="cx" style="display: block; padding: 0 10px">                                        'raw' => array( 'text' => 'Text 1' ),
</span><span class="cx" style="display: block; padding: 0 10px">                                ),
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                'id_base'  => 'text',
</del><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><span class="cx" style="display: block; padding: 0 10px">                $data     = $response->get_data();
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertEquals( 'text-2', $data['id'] );
-               $this->assertEquals( 'sidebar-1', $data['sidebar'] );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertSame( 'text-2', $data['id'] );
+               $this->assertSame( 'sidebar-1', $data['sidebar'] );
</ins><span class="cx" style="display: block; padding: 0 10px">                 $this->assertEqualSets(
</span><span class="cx" style="display: block; padding: 0 10px">                        array(
</span><span class="cx" style="display: block; padding: 0 10px">                                'text'   => 'Text 1',
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -768,17 +768,17 @@
</span><span class="cx" style="display: block; padding: 0 10px">                $request = new WP_REST_Request( 'POST', '/wp/v2/widgets' );
</span><span class="cx" style="display: block; padding: 0 10px">                $request->set_body_params(
</span><span class="cx" style="display: block; padding: 0 10px">                        array(
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                                'id_base'  => 'text',
</ins><span class="cx" style="display: block; padding: 0 10px">                                 'sidebar'  => 'sidebar-1',
</span><span class="cx" style="display: block; padding: 0 10px">                                'instance' => array(
</span><span class="cx" style="display: block; padding: 0 10px">                                        'raw' => array( 'text' => 'Text 2' ),
</span><span class="cx" style="display: block; padding: 0 10px">                                ),
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                'id_base'  => 'text',
</del><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><span class="cx" style="display: block; padding: 0 10px">                $data     = $response->get_data();
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertEquals( 'text-3', $data['id'] );
-               $this->assertEquals( 'sidebar-1', $data['sidebar'] );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertSame( 'text-3', $data['id'] );
+               $this->assertSame( 'sidebar-1', $data['sidebar'] );
</ins><span class="cx" style="display: block; padding: 0 10px">                 $this->assertEqualSets(
</span><span class="cx" style="display: block; padding: 0 10px">                        array(
</span><span class="cx" style="display: block; padding: 0 10px">                                'text'   => 'Text 2',
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -814,6 +814,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                $request = new WP_REST_Request( 'POST', '/wp/v2/widgets' );
</span><span class="cx" style="display: block; padding: 0 10px">                $request->set_body_params(
</span><span class="cx" style="display: block; padding: 0 10px">                        array(
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                                'id_base'  => 'text',
</ins><span class="cx" style="display: block; padding: 0 10px">                                 'sidebar'  => 'sidebar-1',
</span><span class="cx" style="display: block; padding: 0 10px">                                'instance' => array(
</span><span class="cx" style="display: block; padding: 0 10px">                                        'raw' => array(
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -820,13 +821,12 @@
</span><span class="cx" style="display: block; padding: 0 10px">                                                'text' => 'Updated text test',
</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">-                                'id_base'  => 'text',
</del><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><span class="cx" style="display: block; padding: 0 10px">                $data     = $response->get_data();
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertEquals( 'text-2', $data['id'] );
-               $this->assertEquals( 'sidebar-1', $data['sidebar'] );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertSame( 'text-2', $data['id'] );
+               $this->assertSame( 'sidebar-1', $data['sidebar'] );
</ins><span class="cx" style="display: block; padding: 0 10px">                 $this->assertEqualSets(
</span><span class="cx" style="display: block; padding: 0 10px">                        array(
</span><span class="cx" style="display: block; padding: 0 10px">                                'text'   => 'Updated text test',
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -860,6 +860,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                $request->set_body_params(
</span><span class="cx" style="display: block; padding: 0 10px">                        array(
</span><span class="cx" style="display: block; padding: 0 10px">                                'id'       => 'text-1',
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                                'id_base'  => 'text',
</ins><span class="cx" style="display: block; padding: 0 10px">                                 'sidebar'  => 'sidebar-1',
</span><span class="cx" style="display: block; padding: 0 10px">                                'instance' => array(
</span><span class="cx" style="display: block; padding: 0 10px">                                        'raw' => array(
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -866,14 +867,13 @@
</span><span class="cx" style="display: block; padding: 0 10px">                                                'text' => 'Updated text test',
</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">-                                'id_base'  => 'text',
</del><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><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( 'text-1', $data['id'] );
-               $this->assertEquals( 'sidebar-1', $data['sidebar'] );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertSame( 'text-1', $data['id'] );
+               $this->assertSame( 'sidebar-1', $data['sidebar'] );
</ins><span class="cx" style="display: block; padding: 0 10px">                 $this->assertEqualSets(
</span><span class="cx" style="display: block; padding: 0 10px">                        array(
</span><span class="cx" style="display: block; padding: 0 10px">                                'text'   => 'Updated text test',
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -919,7 +919,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">                $error    = $response->as_error();
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertNotWPError( $error, $error ? $error->get_error_message() : '' );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertEquals( 'sidebar-2', $response->get_data()['sidebar'] );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertSame( 'sidebar-2', $response->get_data()['sidebar'] );
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $sidebar1 = rest_do_request( '/wp/v2/sidebars/sidebar-1' );
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertNotContains( 'text-1', $sidebar1->get_data()['widgets'] );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -961,8 +961,8 @@
</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( 'text-1', $data['id'] );
-               $this->assertEquals( 'sidebar-1', $data['sidebar'] );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertSame( 'text-1', $data['id'] );
+               $this->assertSame( 'sidebar-1', $data['sidebar'] );
</ins><span class="cx" style="display: block; padding: 0 10px">                 $this->assertEqualSets(
</span><span class="cx" style="display: block; padding: 0 10px">                        array(
</span><span class="cx" style="display: block; padding: 0 10px">                                'text'   => 'Updated text test',
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -978,12 +978,12 @@
</span><span class="cx" style="display: block; padding: 0 10px">         */
</span><span class="cx" style="display: block; padding: 0 10px">        public function test_store_html_as_admin() {
</span><span class="cx" style="display: block; padding: 0 10px">                if ( is_multisite() ) {
</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">                                 '<div class="textwidget">alert(1)</div>',
</span><span class="cx" style="display: block; padding: 0 10px">                                $this->update_text_widget_with_raw_html( '<script>alert(1)</script>' )
</span><span class="cx" style="display: block; padding: 0 10px">                        );
</span><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(
</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">                                 '<div class="textwidget"><script>alert(1)</script></div>',
</span><span class="cx" style="display: block; padding: 0 10px">                                $this->update_text_widget_with_raw_html( '<script>alert(1)</script>' )
</span><span class="cx" style="display: block; padding: 0 10px">                        );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -996,12 +996,12 @@
</span><span class="cx" style="display: block; padding: 0 10px">        public function test_store_html_as_superadmin() {
</span><span class="cx" style="display: block; padding: 0 10px">                wp_set_current_user( self::$superadmin_id );
</span><span class="cx" style="display: block; padding: 0 10px">                if ( is_multisite() ) {
</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">                                 '<div class="textwidget"><script>alert(1)</script></div>',
</span><span class="cx" style="display: block; padding: 0 10px">                                $this->update_text_widget_with_raw_html( '<script>alert(1)</script>' )
</span><span class="cx" style="display: block; padding: 0 10px">                        );
</span><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(
</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">                                 '<div class="textwidget"><script>alert(1)</script></div>',
</span><span class="cx" style="display: block; padding: 0 10px">                                $this->update_text_widget_with_raw_html( '<script>alert(1)</script>' )
</span><span class="cx" style="display: block; padding: 0 10px">                        );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1028,12 +1028,12 @@
</span><span class="cx" style="display: block; padding: 0 10px">                $request->set_body_params(
</span><span class="cx" style="display: block; padding: 0 10px">                        array(
</span><span class="cx" style="display: block; padding: 0 10px">                                'id'       => 'text-1',
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                                'id_base'  => 'text',
</ins><span class="cx" style="display: block; padding: 0 10px">                                 'instance' => array(
</span><span class="cx" style="display: block; padding: 0 10px">                                        'raw' => array(
</span><span class="cx" style="display: block; padding: 0 10px">                                                'text' => $html,
</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">-                                'id_base'  => 'text',
</del><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><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1065,14 +1065,14 @@
</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">                $data     = $this->remove_links( $data );
</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(
</span><span class="cx" style="display: block; padding: 0 10px">                                'id'            => 'testwidget',
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                                'id_base'       => 'testwidget',
</ins><span class="cx" style="display: block; padding: 0 10px">                                 'sidebar'       => 'sidebar-1',
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                'instance'      => null,
</del><span class="cx" style="display: block; padding: 0 10px">                                 'rendered'      => '<h1>My test id</h1><span>My test title</span>',
</span><span class="cx" style="display: block; padding: 0 10px">                                'rendered_form' => 'WP test widget form',
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                'id_base'       => 'testwidget',
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                         'instance'      => null,
</ins><span class="cx" style="display: block; padding: 0 10px">                         ),
</span><span class="cx" style="display: block; padding: 0 10px">                        $data
</span><span class="cx" style="display: block; padding: 0 10px">                );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1102,14 +1102,14 @@
</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">                $data     = $this->remove_links( $data );
</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(
</span><span class="cx" style="display: block; padding: 0 10px">                                'id'            => 'testwidget',
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                                'id_base'       => 'testwidget',
</ins><span class="cx" style="display: block; padding: 0 10px">                                 'sidebar'       => 'sidebar-1',
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                'instance'      => null,
</del><span class="cx" style="display: block; padding: 0 10px">                                 'rendered'      => '<h1>My test id</h1><span>My test title</span>',
</span><span class="cx" style="display: block; padding: 0 10px">                                'rendered_form' => 'WP test widget form',
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                'id_base'       => 'testwidget',
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                         'instance'      => null,
</ins><span class="cx" style="display: block; padding: 0 10px">                         ),
</span><span class="cx" style="display: block; padding: 0 10px">                        $data
</span><span class="cx" style="display: block; padding: 0 10px">                );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1158,6 +1158,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                $request->set_body_params(
</span><span class="cx" style="display: block; padding: 0 10px">                        array(
</span><span class="cx" style="display: block; padding: 0 10px">                                'id'       => 'text-1',
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                                'id_base'  => 'text',
</ins><span class="cx" style="display: block; padding: 0 10px">                                 'sidebar'  => 'sidebar-1',
</span><span class="cx" style="display: block; padding: 0 10px">                                'instance' => array(
</span><span class="cx" style="display: block; padding: 0 10px">                                        'raw' => array(
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1164,7 +1165,6 @@
</span><span class="cx" style="display: block; padding: 0 10px">                                                'text' => 'Updated \\" \\\' text test',
</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">-                                'id_base'  => 'text',
</del><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><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1179,7 +1179,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                        $data['instance']['raw']
</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(
</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">                         '<div class="textwidget">Updated \\" \\\' text test</div>',
</span><span class="cx" style="display: block; padding: 0 10px">                        $data['rendered']
</span><span class="cx" style="display: block; padding: 0 10px">                );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1210,6 +1210,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertEqualSets(
</span><span class="cx" style="display: block; padding: 0 10px">                        array(
</span><span class="cx" style="display: block; padding: 0 10px">                                'id'            => 'text-1',
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                                'id_base'       => 'text',
</ins><span class="cx" style="display: block; padding: 0 10px">                                 'sidebar'       => 'wp_inactive_widgets',
</span><span class="cx" style="display: block; padding: 0 10px">                                'instance'      => array(
</span><span class="cx" style="display: block; padding: 0 10px">                                        'encoded' => base64_encode(
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1230,7 +1231,6 @@
</span><span class="cx" style="display: block; padding: 0 10px">                                                'text' => 'Custom text test',
</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">-                                'id_base'       => 'text',
</del><span class="cx" style="display: block; padding: 0 10px">                                 'rendered'      => '',
</span><span class="cx" style="display: block; padding: 0 10px">                                'rendered_form' => '<input id="widget-text-1-title" name="widget-text[1][title]" class="title sync-input" type="hidden" value="">' . "\n" .
</span><span class="cx" style="display: block; padding: 0 10px">                                                                '                       <textarea id="widget-text-1-text" name="widget-text[1][text]" class="text sync-input" hidden>Custom text test</textarea>' . "\n" .
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1270,6 +1270,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                                'previous' => array(
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                                        'id'            => 'text-1',
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                                        'id_base'       => 'text',
</ins><span class="cx" style="display: block; padding: 0 10px">                                         'sidebar'       => 'sidebar-1',
</span><span class="cx" style="display: block; padding: 0 10px">                                        'instance'      => array(
</span><span class="cx" style="display: block; padding: 0 10px">                                                'encoded' => base64_encode(
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1290,7 +1291,6 @@
</span><span class="cx" style="display: block; padding: 0 10px">                                                        'text' => 'Custom text test',
</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">-                                        'id_base'       => 'text',
</del><span class="cx" style="display: block; padding: 0 10px">                                         'rendered'      => '<div class="textwidget">Custom text test</div>',
</span><span class="cx" style="display: block; padding: 0 10px">                                        'rendered_form' => '<input id="widget-text-1-title" name="widget-text[1][title]" class="title sync-input" type="hidden" value="">' . "\n" .
</span><span class="cx" style="display: block; padding: 0 10px">                                                                        '                       <textarea id="widget-text-1-text" name="widget-text[1][text]" class="text sync-input" hidden>Custom text test</textarea>' . "\n" .
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1303,7 +1303,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_do_request( '/wp/v2/widgets/text-1' );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertEquals( 404, $response->get_status() );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertSame( 404, $response->get_status() );
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertArrayNotHasKey( 'text-1', get_option( 'sidebars_widgets' )['sidebar-1'] );
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertArrayNotHasKey( 1, get_option( 'widget_text' ) );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1379,7 +1379,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                $data       = $response->get_data();
</span><span class="cx" style="display: block; padding: 0 10px">                $properties = $data['schema']['properties'];
</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( 7, count( $properties ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertSame( 7, count( $properties ) );
</ins><span class="cx" style="display: block; padding: 0 10px">                 $this->assertArrayHasKey( 'id', $properties );
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertArrayHasKey( 'id_base', $properties );
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertArrayHasKey( 'sidebar', $properties );
</span></span></pre></div>
<a id="trunktestsphpunitteststhemewpThemeJsonphp"></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/theme/wpThemeJson.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/theme/wpThemeJson.php   2021-06-06 14:04:52 UTC (rev 51078)
+++ trunk/tests/phpunit/tests/theme/wpThemeJson.php     2021-06-07 11:16:29 UTC (rev 51079)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -156,15 +156,15 @@
</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(
</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">                         'body{--wp--preset--color--grey: grey;}.wp-block-group{--wp--custom--base-font: 16;--wp--custom--line-height--small: 1.2;--wp--custom--line-height--medium: 1.4;--wp--custom--line-height--large: 1.8;}body{color: var(--wp--preset--color--grey);}a{background-color: #333;color: #111;}.wp-block-group{padding-top: 12px;padding-bottom: 24px;}.wp-block-group a{color: #111;}h1,h2,h3,h4,h5,h6{color: #123456;}h1 a,h2 a,h3 a,h4 a,h5 a,h6 a{background-color: #333;color: #111;font-size: 60px;}.wp-block-post-date{color: #123456;}.wp-block-post-date a{background-color: #777;color: #555;}.has-grey-color{color: grey !important;}.has-grey-background-color{background-color: grey !important;}',
</span><span class="cx" style="display: block; padding: 0 10px">                        $theme_json->get_stylesheet()
</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">                         'body{color: var(--wp--preset--color--grey);}a{background-color: #333;color: #111;}.wp-block-group{padding-top: 12px;padding-bottom: 24px;}.wp-block-group a{color: #111;}h1,h2,h3,h4,h5,h6{color: #123456;}h1 a,h2 a,h3 a,h4 a,h5 a,h6 a{background-color: #333;color: #111;font-size: 60px;}.wp-block-post-date{color: #123456;}.wp-block-post-date a{background-color: #777;color: #555;}.has-grey-color{color: grey !important;}.has-grey-background-color{background-color: grey !important;}',
</span><span class="cx" style="display: block; padding: 0 10px">                        $theme_json->get_stylesheet( 'block_styles' )
</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">                         'body{--wp--preset--color--grey: grey;}.wp-block-group{--wp--custom--base-font: 16;--wp--custom--line-height--small: 1.2;--wp--custom--line-height--medium: 1.4;--wp--custom--line-height--large: 1.8;}',
</span><span class="cx" style="display: block; padding: 0 10px">                        $theme_json->get_stylesheet( 'css_variables' )
</span><span class="cx" style="display: block; padding: 0 10px">                );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -191,7 +191,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(
</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">                         'h1.has-white-color,h2.has-white-color,h3.has-white-color,h4.has-white-color,h5.has-white-color,h6.has-white-color{color: #fff !important;}h1.has-white-background-color,h2.has-white-background-color,h3.has-white-background-color,h4.has-white-background-color,h5.has-white-background-color,h6.has-white-background-color{background-color: #fff !important;}',
</span><span class="cx" style="display: block; padding: 0 10px">                        $theme_json->get_stylesheet( 'block_styles' )
</span><span class="cx" style="display: block; padding: 0 10px">                );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -227,11 +227,11 @@
</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(
</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">                         '.wp-block-group{--wp--preset--color--grey: grey;}.wp-block-group{color: red;}.wp-block-group.has-grey-color{color: grey !important;}.wp-block-group.has-grey-background-color{background-color: grey !important;}',
</span><span class="cx" style="display: block; padding: 0 10px">                        $theme_json->get_stylesheet()
</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">                         '.wp-block-group{color: red;}.wp-block-group.has-grey-color{color: grey !important;}.wp-block-group.has-grey-background-color{background-color: grey !important;}',
</span><span class="cx" style="display: block; padding: 0 10px">                        $theme_json->get_stylesheet( 'block_styles' )
</span><span class="cx" style="display: block; padding: 0 10px">                );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -268,7 +268,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(
</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">                         'body{--wp--preset--color--grey: grey;}p{background-color: blue;color: red;font-size: 12px;line-height: 1.3;}.has-grey-color{color: grey !important;}.has-grey-background-color{background-color: grey !important;}',
</span><span class="cx" style="display: block; padding: 0 10px">                        $theme_json->get_stylesheet()
</span><span class="cx" style="display: block; padding: 0 10px">                );
</span></span></pre></div>
<a id="trunktestsphpunitteststhemewpThemeJsonResolverphp"></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/theme/wpThemeJsonResolver.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/theme/wpThemeJsonResolver.php   2021-06-06 14:04:52 UTC (rev 51078)
+++ trunk/tests/phpunit/tests/theme/wpThemeJsonResolver.php     2021-06-07 11:16:29 UTC (rev 51079)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -88,7 +88,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( $expected, $actual );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertSame( $expected, $actual );
</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>
</div>

</body>
</html>