<!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>[56746] trunk/tests/phpunit/tests: Tests: Reduce usage of assertEquals</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/56746">56746</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/56746","name":"Review Commit"}}</script></dd>
<dt style="float: left; width: 6em; font-weight: bold">Author</dt> <dd>jorbin</dd>
<dt style="float: left; width: 6em; font-weight: bold">Date</dt> <dd>2023-09-29 15:22:12 +0000 (Fri, 29 Sep 2023)</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: Reduce usage of assertEquals

Replaces assertSame with assertCount in a number of tests.

Props ayeshrajans, jorbin.
See <a href="https://core.trac.wordpress.org/ticket/58956">#58956</a>.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunktestsphpunittestsblocksgetBlockTemplatesphp">trunk/tests/phpunit/tests/blocks/getBlockTemplates.php</a></li>
<li><a href="#trunktestsphpunittestscustomizewidgetsphp">trunk/tests/phpunit/tests/customize/widgets.php</a></li>
<li><a href="#trunktestsphpunittestsdatequeryphp">trunk/tests/phpunit/tests/date/query.php</a></li>
<li><a href="#trunktestsphpunittestsfeedrss2php">trunk/tests/phpunit/tests/feed/rss2.php</a></li>
<li><a href="#trunktestsphpunittestsmetaphp">trunk/tests/phpunit/tests/meta.php</a></li>
<li><a href="#trunktestsphpunittestspostgetPagesphp">trunk/tests/phpunit/tests/post/getPages.php</a></li>
<li><a href="#trunktestsphpunittestsrestapirestcategoriescontrollerphp">trunk/tests/phpunit/tests/rest-api/rest-categories-controller.php</a></li>
<li><a href="#trunktestsphpunittestsrestapirestposttypescontrollerphp">trunk/tests/phpunit/tests/rest-api/rest-post-types-controller.php</a></li>
<li><a href="#trunktestsphpunittestsrestapiresttagscontrollerphp">trunk/tests/phpunit/tests/rest-api/rest-tags-controller.php</a></li>
<li><a href="#trunktestsphpunittestsrestapiresttaxonomiescontrollerphp">trunk/tests/phpunit/tests/rest-api/rest-taxonomies-controller.php</a></li>
<li><a href="#trunktestsphpunittestsrestapiwpRestMenuItemsControllerphp">trunk/tests/phpunit/tests/rest-api/wpRestMenuItemsController.php</a></li>
<li><a href="#trunktestsphpunittestsrestapiwpRestMenuLocationsControllerphp">trunk/tests/phpunit/tests/rest-api/wpRestMenuLocationsController.php</a></li>
<li><a href="#trunktestsphpunittestsrestapiwpRestMenusControllerphp">trunk/tests/phpunit/tests/rest-api/wpRestMenusController.php</a></li>
<li><a href="#trunktestsphpunitteststermgetTermsphp">trunk/tests/phpunit/tests/term/getTerms.php</a></li>
<li><a href="#trunktestsphpunittestsuserphp">trunk/tests/phpunit/tests/user.php</a></li>
<li><a href="#trunktestsphpunittestswidgetswpWidgetMediaphp">trunk/tests/phpunit/tests/widgets/wpWidgetMedia.php</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunktestsphpunittestsblocksgetBlockTemplatesphp"></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/blocks/getBlockTemplates.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/blocks/getBlockTemplates.php    2023-09-29 15:05:40 UTC (rev 56745)
+++ trunk/tests/phpunit/tests/blocks/getBlockTemplates.php      2023-09-29 15:22:12 UTC (rev 56746)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -161,7 +161,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertNotEmpty( $block_templates, 'get_block_templates() must return a non-empty value.' );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $block_template_ids = wp_list_pluck( $block_templates, 'id' );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertSame( count( array_unique( $block_template_ids ) ), count( $block_template_ids ), $error_message );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertCount( count( array_unique( $block_template_ids ) ), $block_template_ids, $error_message );
</ins><span class="cx" style="display: block; padding: 0 10px">         }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">        /**
</span></span></pre></div>
<a id="trunktestsphpunittestscustomizewidgetsphp"></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/customize/widgets.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/customize/widgets.php   2023-09-29 15:05:40 UTC (rev 56745)
+++ trunk/tests/phpunit/tests/customize/widgets.php     2023-09-29 15:22:12 UTC (rev 56746)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -236,7 +236,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $selective_refreshable_widgets = $this->manager->widgets->get_selective_refreshable_widgets();
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertIsArray( $selective_refreshable_widgets );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertSame( count( $wp_widget_factory->widgets ), count( $selective_refreshable_widgets ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertCount( count( $wp_widget_factory->widgets ), $selective_refreshable_widgets );
</ins><span class="cx" style="display: block; padding: 0 10px">                 $this->assertArrayHasKey( 'text', $selective_refreshable_widgets );
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertTrue( $selective_refreshable_widgets['text'] );
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertArrayHasKey( 'search', $selective_refreshable_widgets );
</span></span></pre></div>
<a id="trunktestsphpunittestsdatequeryphp"></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/date/query.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/date/query.php  2023-09-29 15:05:40 UTC (rev 56745)
+++ trunk/tests/phpunit/tests/date/query.php    2023-09-29 15:22:12 UTC (rev 56746)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1184,7 +1184,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $parts = mb_split( '\)\s+AND\s+\(', $sql );
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertIsArray( $parts, 'SQL query cannot be split into multiple parts using operator AND.' );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertSame( 2, count( $parts ), 'SQL query does not contain correct number of AND operators.' );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertCount( 2, $parts, 'SQL query does not contain correct number of AND operators.' );
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertStringNotContainsString( 'OR', $sql, 'SQL query contains conditions joined by operator OR.' );
</span><span class="cx" style="display: block; padding: 0 10px">        }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1231,7 +1231,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $parts = mb_split( '\)\s+OR\s+\(', $sql );
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertIsArray( $parts, 'SQL query cannot be split into multiple parts using operator OR.' );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertSame( 2, count( $parts ), 'SQL query does not contain correct number of OR operators.' );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertCount( 2, $parts, 'SQL query does not contain correct number of OR operators.' );
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                // Checking number of occurrences of AND while skipping the one at the beginning.
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertSame( 2, substr_count( substr( $sql, 5 ), 'AND' ), 'SQL query does not contain expected number conditions joined by operator AND.' );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1277,7 +1277,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $parts = mb_split( '\)\s+AND\s+\(', $sql );
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertIsArray( $parts, 'SQL query cannot be split into multiple parts using operator AND.' );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertSame( 2, count( $parts ), 'SQL query does not contain correct number of AND operators.' );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertCount( 2, $parts, 'SQL query does not contain correct number of AND operators.' );
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertStringNotContainsString( 'OR', $sql, 'SQL query contains conditions joined by operator OR.' );
</span><span class="cx" style="display: block; padding: 0 10px">        }
</span></span></pre></div>
<a id="trunktestsphpunittestsfeedrss2php"></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/feed/rss2.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/feed/rss2.php   2023-09-29 15:05:40 UTC (rev 56745)
+++ trunk/tests/phpunit/tests/feed/rss2.php     2023-09-29 15:22:12 UTC (rev 56746)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -246,7 +246,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                        }
</span><span class="cx" style="display: block; padding: 0 10px">                        $cats = array_filter( $cats );
</span><span class="cx" style="display: block; padding: 0 10px">                        // Should be the same number of categories.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                        $this->assertSame( count( $cats ), count( $categories ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                 $this->assertCount( count( $cats ), $categories );
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                        // ..with the same names.
</span><span class="cx" style="display: block; padding: 0 10px">                        foreach ( $cats as $id => $cat ) {
</span></span></pre></div>
<a id="trunktestsphpunittestsmetaphp"></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/meta.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/meta.php        2023-09-29 15:05:40 UTC (rev 56745)
+++ trunk/tests/phpunit/tests/meta.php  2023-09-29 15:22:12 UTC (rev 56746)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -151,38 +151,34 @@
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertNotEquals( $this->author->user_login, $u[0]->user_login );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                // Test EXISTS and NOT EXISTS together, no users should be found.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertSame(
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertCount(
</ins><span class="cx" style="display: block; padding: 0 10px">                         0,
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                        count(
-                               get_users(
-                                       array(
-                                               'meta_query' => array(
-                                                       array(
-                                                               'key'     => 'meta_key',
-                                                               'compare' => 'NOT EXISTS',
-                                                       ),
-                                                       array(
-                                                               'key'     => 'delete_meta_key',
-                                                               'compare' => 'EXISTS',
-                                                       ),
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                 get_users(
+                               array(
+                                       'meta_query' => array(
+                                               array(
+                                                       'key'     => 'meta_key',
+                                                       'compare' => 'NOT EXISTS',
</ins><span class="cx" style="display: block; padding: 0 10px">                                                 ),
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                        )
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                                         array(
+                                                       'key'     => 'delete_meta_key',
+                                                       'compare' => 'EXISTS',
+                                               ),
+                                       ),
</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="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertSame(
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertCount(
</ins><span class="cx" style="display: block; padding: 0 10px">                         2,
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                        count(
-                               get_users(
-                                       array(
-                                               'meta_query' => array(
-                                                       array(
-                                                               'key'     => 'non_existing_meta',
-                                                               'compare' => 'NOT EXISTS',
-                                                       ),
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                 get_users(
+                               array(
+                                       'meta_query' => array(
+                                               array(
+                                                       'key'     => 'non_existing_meta',
+                                                       'compare' => 'NOT EXISTS',
</ins><span class="cx" style="display: block; padding: 0 10px">                                                 ),
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                        )
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                                 ),
</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">@@ -189,18 +185,16 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                delete_metadata( 'user', $this->author->ID, 'meta_key' );
</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->assertSame(
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertCount(
</ins><span class="cx" style="display: block; padding: 0 10px">                         2,
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                        count(
-                               get_users(
-                                       array(
-                                               'meta_query' => array(
-                                                       array(
-                                                               'key'     => 'meta_key',
-                                                               'compare' => 'NOT EXISTS',
-                                                       ),
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                 get_users(
+                               array(
+                                       'meta_query' => array(
+                                               array(
+                                                       'key'     => 'meta_key',
+                                                       'compare' => 'NOT EXISTS',
</ins><span class="cx" style="display: block; padding: 0 10px">                                                 ),
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                        )
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                                 ),
</ins><span class="cx" style="display: block; padding: 0 10px">                                 )
</span><span class="cx" style="display: block; padding: 0 10px">                        )
</span><span class="cx" style="display: block; padding: 0 10px">                );
</span></span></pre></div>
<a id="trunktestsphpunittestspostgetPagesphp"></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/getPages.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/post/getPages.php       2023-09-29 15:05:40 UTC (rev 56745)
+++ trunk/tests/phpunit/tests/post/getPages.php 2023-09-29 15:22:12 UTC (rev 56746)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -274,25 +274,21 @@
</span><span class="cx" style="display: block; padding: 0 10px">                add_post_meta( $posts[1], 'some-meta-key', '' );
</span><span class="cx" style="display: block; padding: 0 10px">                add_post_meta( $posts[2], 'some-meta-key', '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">-                $this->assertSame(
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertCount(
</ins><span class="cx" style="display: block; padding: 0 10px">                         1,
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                        count(
-                               get_pages(
-                                       array(
-                                               'meta_key'   => 'some-meta-key',
-                                               'meta_value' => '0',
-                                       )
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                 get_pages(
+                               array(
+                                       'meta_key'   => 'some-meta-key',
+                                       'meta_value' => '0',
</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><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertSame(
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertCount(
</ins><span class="cx" style="display: block; padding: 0 10px">                         1,
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                        count(
-                               get_pages(
-                                       array(
-                                               'meta_key'   => 'some-meta-key',
-                                               'meta_value' => '1',
-                                       )
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                 get_pages(
+                               array(
+                                       'meta_key'   => 'some-meta-key',
+                                       'meta_value' => '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">                );
</span></span></pre></div>
<a id="trunktestsphpunittestsrestapirestcategoriescontrollerphp"></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-categories-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-categories-controller.php 2023-09-29 15:05:40 UTC (rev 56745)
+++ trunk/tests/phpunit/tests/rest-api/rest-categories-controller.php   2023-09-29 15:22:12 UTC (rev 56746)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -223,7 +223,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                        'parent'     => 0,
</span><span class="cx" style="display: block; padding: 0 10px">                );
</span><span class="cx" style="display: block; padding: 0 10px">                $categories = get_terms( 'category', $args );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertSame( count( $categories ), count( $data ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertCount( count( $categories ), $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">        public function test_get_items_parent_zero_arg_string() {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -255,7 +255,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                        'parent'     => 0,
</span><span class="cx" style="display: block; padding: 0 10px">                );
</span><span class="cx" style="display: block; padding: 0 10px">                $categories = get_terms( 'category', $args );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertSame( count( $categories ), count( $data ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertCount( count( $categories ), $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">        public function test_get_items_by_parent_non_found() {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1189,7 +1189,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                        'hide_empty' => false,
</span><span class="cx" style="display: block; padding: 0 10px">                );
</span><span class="cx" style="display: block; padding: 0 10px">                $categories = get_terms( 'category', $args );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertSame( count( $categories ), count( $data ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertCount( count( $categories ), $data );
</ins><span class="cx" style="display: block; padding: 0 10px">                 $this->assertSame( $categories[0]->term_id, $data[0]['id'] );
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertSame( $categories[0]->name, $data[0]['name'] );
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertSame( $categories[0]->slug, $data[0]['slug'] );
</span></span></pre></div>
<a id="trunktestsphpunittestsrestapirestposttypescontrollerphp"></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-post-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-post-types-controller.php 2023-09-29 15:05:40 UTC (rev 56745)
+++ trunk/tests/phpunit/tests/rest-api/rest-post-types-controller.php   2023-09-29 15:22:12 UTC (rev 56746)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -36,7 +36,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $data       = $response->get_data();
</span><span class="cx" style="display: block; padding: 0 10px">                $post_types = get_post_types( array( 'show_in_rest' => true ), 'objects' );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertSame( count( $post_types ), count( $data ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertCount( count( $post_types ), $data );
</ins><span class="cx" style="display: block; padding: 0 10px">                 $this->assertSame( $post_types['post']->name, $data['post']['slug'] );
</span><span class="cx" style="display: block; padding: 0 10px">                $this->check_post_type_obj( 'view', $post_types['post'], $data['post'], $data['post']['_links'] );
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertSame( $post_types['page']->name, $data['page']['slug'] );
</span></span></pre></div>
<a id="trunktestsphpunittestsrestapiresttagscontrollerphp"></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-tags-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-tags-controller.php       2023-09-29 15:05:40 UTC (rev 56745)
+++ trunk/tests/phpunit/tests/rest-api/rest-tags-controller.php 2023-09-29 15:22:12 UTC (rev 56746)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1409,7 +1409,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                        'hide_empty' => false,
</span><span class="cx" style="display: block; padding: 0 10px">                );
</span><span class="cx" style="display: block; padding: 0 10px">                $tags = get_terms( 'post_tag', $args );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertSame( count( $tags ), count( $data ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertCount( count( $tags ), $data );
</ins><span class="cx" style="display: block; padding: 0 10px">                 $this->assertSame( $tags[0]->term_id, $data[0]['id'] );
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertSame( $tags[0]->name, $data[0]['name'] );
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertSame( $tags[0]->slug, $data[0]['slug'] );
</span></span></pre></div>
<a id="trunktestsphpunittestsrestapiresttaxonomiescontrollerphp"></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-taxonomies-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-taxonomies-controller.php 2023-09-29 15:05:40 UTC (rev 56745)
+++ trunk/tests/phpunit/tests/rest-api/rest-taxonomies-controller.php   2023-09-29 15:22:12 UTC (rev 56746)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -50,7 +50,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">                $taxonomies = $this->get_public_taxonomies( get_taxonomies( '', 'objects' ) );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertSame( count( $taxonomies ), count( $data ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertCount( count( $taxonomies ), $data );
</ins><span class="cx" style="display: block; padding: 0 10px">                 $this->assertSame( 'Categories', $data['category']['name'] );
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertSame( 'category', $data['category']['slug'] );
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertTrue( $data['category']['hierarchical'] );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -69,7 +69,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                $taxonomies = get_taxonomies( '', 'objects' );
</span><span class="cx" style="display: block; padding: 0 10px">                unset( $taxonomies['nav_menu'] ); // Menus are not editable by contributors.
</span><span class="cx" style="display: block; padding: 0 10px">                $taxonomies = $this->get_public_taxonomies( $taxonomies );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertSame( count( $taxonomies ), count( $data ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertCount( count( $taxonomies ), $data );
</ins><span class="cx" style="display: block; padding: 0 10px">                 $this->assertSame( 'Categories', $data['category']['name'] );
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertSame( 'category', $data['category']['slug'] );
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertTrue( $data['category']['hierarchical'] );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -286,7 +286,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertSame( 200, $response->get_status() );
</span><span class="cx" style="display: block; padding: 0 10px">                $data       = $response->get_data();
</span><span class="cx" style="display: block; padding: 0 10px">                $taxonomies = $this->get_public_taxonomies( get_object_taxonomies( $type, 'objects' ) );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertSame( count( $taxonomies ), count( $data ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertCount( count( $taxonomies ), $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></pre></div>
<a id="trunktestsphpunittestsrestapiwpRestMenuItemsControllerphp"></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/wpRestMenuItemsController.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/rest-api/wpRestMenuItemsController.php  2023-09-29 15:05:40 UTC (rev 56745)
+++ trunk/tests/phpunit/tests/rest-api/wpRestMenuItemsController.php    2023-09-29 15:22:12 UTC (rev 56746)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -743,7 +743,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">                $properties = $data['schema']['properties'];
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertSame( 18, count( $properties ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertCount( 18, $properties );
</ins><span class="cx" style="display: block; padding: 0 10px">                 $this->assertArrayHasKey( 'type_label', $properties );
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertArrayHasKey( 'attr_title', $properties );
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertArrayHasKey( 'classes', $properties );
</span></span></pre></div>
<a id="trunktestsphpunittestsrestapiwpRestMenuLocationsControllerphp"></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/wpRestMenuLocationsController.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/rest-api/wpRestMenuLocationsController.php      2023-09-29 15:05:40 UTC (rev 56745)
+++ trunk/tests/phpunit/tests/rest-api/wpRestMenuLocationsController.php        2023-09-29 15:22:12 UTC (rev 56746)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -181,7 +181,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">                $properties = $data['schema']['properties'];
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertSame( 3, count( $properties ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertCount( 3, $properties );
</ins><span class="cx" style="display: block; padding: 0 10px">                 $this->assertArrayHasKey( 'name', $properties );
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertArrayHasKey( 'description', $properties );
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertArrayHasKey( 'menu', $properties );
</span></span></pre></div>
<a id="trunktestsphpunittestsrestapiwpRestMenusControllerphp"></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/wpRestMenusController.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/rest-api/wpRestMenusController.php      2023-09-29 15:05:40 UTC (rev 56745)
+++ trunk/tests/phpunit/tests/rest-api/wpRestMenusController.php        2023-09-29 15:22:12 UTC (rev 56746)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -338,7 +338,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">                $properties = $data['schema']['properties'];
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertSame( 7, count( $properties ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertCount( 7, $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( 'description', $properties );
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertArrayHasKey( 'meta', $properties );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -573,7 +573,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                        'hide_empty' => false,
</span><span class="cx" style="display: block; padding: 0 10px">                );
</span><span class="cx" style="display: block; padding: 0 10px">                $tags = get_terms( self::TAXONOMY, $args );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertSame( count( $tags ), count( $data ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertCount( count( $tags ), $data );
</ins><span class="cx" style="display: block; padding: 0 10px">                 $this->assertSame( $tags[0]->term_id, $data[0]['id'] );
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertSame( $tags[0]->name, $data[0]['name'] );
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertSame( $tags[0]->slug, $data[0]['slug'] );
</span></span></pre></div>
<a id="trunktestsphpunitteststermgetTermsphp"></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/term/getTerms.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/term/getTerms.php       2023-09-29 15:05:40 UTC (rev 56745)
+++ trunk/tests/phpunit/tests/term/getTerms.php 2023-09-29 15:22:12 UTC (rev 56746)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -3172,7 +3172,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                $num_queries_1 = get_num_queries();
</span><span class="cx" style="display: block; padding: 0 10px">                $query2        = get_terms( $args_2 );
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertSame( $num_queries_1, get_num_queries() );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertSame( count( $query1 ), count( $query2 ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertCount( count( $query1 ), $query2 );
</ins><span class="cx" style="display: block; padding: 0 10px">         }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">        /**
</span></span></pre></div>
<a id="trunktestsphpunittestsuserphp"></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/user.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/user.php        2023-09-29 15:05:40 UTC (rev 56745)
+++ trunk/tests/phpunit/tests/user.php  2023-09-29 15:22:12 UTC (rev 56746)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2083,15 +2083,13 @@
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertCount( 12, $actual['data'][0]['data'] );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                // Check that the item added by the filter was retained.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertSame(
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertCount(
</ins><span class="cx" style="display: block; padding: 0 10px">                         1,
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                        count(
-                               wp_list_filter(
-                                       $actual['data'][0]['data'],
-                                       array(
-                                               'name'  => 'Test Additional Data Name',
-                                               'value' => 'Test Additional Data Value',
-                                       )
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                 wp_list_filter(
+                               $actual['data'][0]['data'],
+                               array(
+                                       'name'  => 'Test Additional Data Name',
+                                       'value' => 'Test Additional Data Value',
</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">@@ -2115,28 +2113,24 @@
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertCount( 12, $actual['data'][0]['data'] );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                // Check that the duplicate 'name' => 'User ID' was stripped.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertSame(
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertCount(
</ins><span class="cx" style="display: block; padding: 0 10px">                         1,
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                        count(
-                               wp_list_filter(
-                                       $actual['data'][0]['data'],
-                                       array(
-                                               'name' => 'User ID',
-                                       )
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                 wp_list_filter(
+                               $actual['data'][0]['data'],
+                               array(
+                                       'name' => 'User ID',
</ins><span class="cx" style="display: block; padding: 0 10px">                                 )
</span><span class="cx" style="display: block; padding: 0 10px">                        )
</span><span class="cx" style="display: block; padding: 0 10px">                );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                // Check that the item added by the filter was retained.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertSame(
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertCount(
</ins><span class="cx" style="display: block; padding: 0 10px">                         1,
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                        count(
-                               wp_list_filter(
-                                       $actual['data'][0]['data'],
-                                       array(
-                                               'name'  => 'Test Additional Data Name',
-                                               'value' => 'Test Additional Data Value',
-                                       )
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                 wp_list_filter(
+                               $actual['data'][0]['data'],
+                               array(
+                                       'name'  => 'Test Additional Data Name',
+                                       'value' => 'Test Additional Data Value',
</ins><span class="cx" style="display: block; padding: 0 10px">                                 )
</span><span class="cx" style="display: block; padding: 0 10px">                        )
</span><span class="cx" style="display: block; padding: 0 10px">                );
</span></span></pre></div>
<a id="trunktestsphpunittestswidgetswpWidgetMediaphp"></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/widgets/wpWidgetMedia.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/widgets/wpWidgetMedia.php       2023-09-29 15:05:40 UTC (rev 56745)
+++ trunk/tests/phpunit/tests/widgets/wpWidgetMedia.php 2023-09-29 15:22:12 UTC (rev 56746)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -76,7 +76,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                        ),
</span><span class="cx" style="display: block; padding: 0 10px">                        array_keys( $widget->l10n )
</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->assertSame( count( $widget->l10n ), count( array_filter( $widget->l10n ) ), 'Expected all translation strings to be defined.' );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertCount( count( $widget->l10n ), array_filter( $widget->l10n ), 'Expected all translation strings to be defined.' );
</ins><span class="cx" style="display: block; padding: 0 10px">                 $this->assertSame( 10, has_action( 'admin_print_scripts-widgets.php', array( $widget, 'enqueue_admin_scripts' ) ) );
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertFalse( has_action( 'wp_enqueue_scripts', array( $widget, 'enqueue_preview_scripts' ) ), 'Did not expect preview scripts to be enqueued when not in customize preview context.' );
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertSame( 10, has_action( 'admin_footer-widgets.php', array( $widget, 'render_control_template_scripts' ) ) );
</span></span></pre>
</div>
</div>

</body>
</html>