<!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>[51367] trunk/tests/phpunit/tests: Tests: Use more appropriate assertions in various 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/51367">51367</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/51367","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-07-07 10:32:56 +0000 (Wed, 07 Jul 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 more appropriate assertions in various tests.
This replaces instances of `assertSame( [number], count( ... ) )` with `assertCount()` to use native PHPUnit functionality.
Follow-up to <a href="https://core.trac.wordpress.org/changeset/51335">[51335]</a>, <a href="https://core.trac.wordpress.org/changeset/51337">[51337]</a>.
See <a href="https://core.trac.wordpress.org/ticket/53363">#53363</a>.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunktestsphpunittestsadminincludesScreenphp">trunk/tests/phpunit/tests/admin/includesScreen.php</a></li>
<li><a href="#trunktestsphpunittestsajaxCustomizeMenusphp">trunk/tests/phpunit/tests/ajax/CustomizeMenus.php</a></li>
<li><a href="#trunktestsphpunittestsblocksblocklistphp">trunk/tests/phpunit/tests/blocks/block-list.php</a></li>
<li><a href="#trunktestsphpunittestscategoryphp">trunk/tests/phpunit/tests/category.php</a></li>
<li><a href="#trunktestsphpunittestscommentgetCommentExcerptphp">trunk/tests/phpunit/tests/comment/getCommentExcerpt.php</a></li>
<li><a href="#trunktestsphpunittestscommentqueryphp">trunk/tests/phpunit/tests/comment/query.php</a></li>
<li><a href="#trunktestsphpunittestscommentphp">trunk/tests/phpunit/tests/comment.php</a></li>
<li><a href="#trunktestsphpunittestsfeedrss2php">trunk/tests/phpunit/tests/feed/rss2.php</a></li>
<li><a href="#trunktestsphpunittestsfunctionswpListFilterphp">trunk/tests/phpunit/tests/functions/wpListFilter.php</a></li>
<li><a href="#trunktestsphpunittestsimportimportphp">trunk/tests/phpunit/tests/import/import.php</a></li>
<li><a href="#trunktestsphpunittestsimportparserphp">trunk/tests/phpunit/tests/import/parser.php</a></li>
<li><a href="#trunktestsphpunittestsmetaphp">trunk/tests/phpunit/tests/meta.php</a></li>
<li><a href="#trunktestsphpunittestsmultisitenetworkQueryphp">trunk/tests/phpunit/tests/multisite/networkQuery.php</a></li>
<li><a href="#trunktestsphpunittestsmultisitesiteQueryphp">trunk/tests/phpunit/tests/multisite/siteQuery.php</a></li>
<li><a href="#trunktestsphpunittestspomomophp">trunk/tests/phpunit/tests/pomo/mo.php</a></li>
<li><a href="#trunktestsphpunittestspomopophp">trunk/tests/phpunit/tests/pomo/po.php</a></li>
<li><a href="#trunktestsphpunittestspostformatsphp">trunk/tests/phpunit/tests/post/formats.php</a></li>
<li><a href="#trunktestsphpunittestspostgetPagesphp">trunk/tests/phpunit/tests/post/getPages.php</a></li>
<li><a href="#trunktestsphpunittestspostobjectsphp">trunk/tests/phpunit/tests/post/objects.php</a></li>
<li><a href="#trunktestsphpunittestspostqueryphp">trunk/tests/phpunit/tests/post/query.php</a></li>
<li><a href="#trunktestsphpunittestsposttypesphp">trunk/tests/phpunit/tests/post/types.php</a></li>
<li><a href="#trunktestsphpunittestspostphp">trunk/tests/phpunit/tests/post.php</a></li>
<li><a href="#trunktestsphpunittestsquerymetaQueryphp">trunk/tests/phpunit/tests/query/metaQuery.php</a></li>
<li><a href="#trunktestsphpunittestsquerytaxQueryphp">trunk/tests/phpunit/tests/query/taxQuery.php</a></li>
<li><a href="#trunktestsphpunittestsrestapirestattachmentscontrollerphp">trunk/tests/phpunit/tests/rest-api/rest-attachments-controller.php</a></li>
<li><a href="#trunktestsphpunittestsrestapirestautosavescontrollerphp">trunk/tests/phpunit/tests/rest-api/rest-autosaves-controller.php</a></li>
<li><a href="#trunktestsphpunittestsrestapirestblocktypecontrollerphp">trunk/tests/phpunit/tests/rest-api/rest-block-type-controller.php</a></li>
<li><a href="#trunktestsphpunittestsrestapirestcategoriescontrollerphp">trunk/tests/phpunit/tests/rest-api/rest-categories-controller.php</a></li>
<li><a href="#trunktestsphpunittestsrestapirestcommentscontrollerphp">trunk/tests/phpunit/tests/rest-api/rest-comments-controller.php</a></li>
<li><a href="#trunktestsphpunittestsrestapirestpagescontrollerphp">trunk/tests/phpunit/tests/rest-api/rest-pages-controller.php</a></li>
<li><a href="#trunktestsphpunittestsrestapirestpoststatusescontrollerphp">trunk/tests/phpunit/tests/rest-api/rest-post-statuses-controller.php</a></li>
<li><a href="#trunktestsphpunittestsrestapirestposttypescontrollerphp">trunk/tests/phpunit/tests/rest-api/rest-post-types-controller.php</a></li>
<li><a href="#trunktestsphpunittestsrestapirestpostscontrollerphp">trunk/tests/phpunit/tests/rest-api/rest-posts-controller.php</a></li>
<li><a href="#trunktestsphpunittestsrestapirestrevisionscontrollerphp">trunk/tests/phpunit/tests/rest-api/rest-revisions-controller.php</a></li>
<li><a href="#trunktestsphpunittestsrestapirestsearchcontrollerphp">trunk/tests/phpunit/tests/rest-api/rest-search-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="#trunktestsphpunittestsrestapirestthemescontrollerphp">trunk/tests/phpunit/tests/rest-api/rest-themes-controller.php</a></li>
<li><a href="#trunktestsphpunittestsrestapirestuserscontrollerphp">trunk/tests/phpunit/tests/rest-api/rest-users-controller.php</a></li>
<li><a href="#trunktestsphpunittestsrestapirestwidgetscontrollerphp">trunk/tests/phpunit/tests/rest-api/rest-widgets-controller.php</a></li>
<li><a href="#trunktestsphpunitteststaxonomyphp">trunk/tests/phpunit/tests/taxonomy.php</a></li>
<li><a href="#trunktestsphpunitteststermcachephp">trunk/tests/phpunit/tests/term/cache.php</a></li>
<li><a href="#trunktestsphpunitteststermgetTermsphp">trunk/tests/phpunit/tests/term/getTerms.php</a></li>
<li><a href="#trunktestsphpunitteststermgetTheTermsphp">trunk/tests/phpunit/tests/term/getTheTerms.php</a></li>
<li><a href="#trunktestsphpunitteststermmetaphp">trunk/tests/phpunit/tests/term/meta.php</a></li>
<li><a href="#trunktestsphpunitteststermqueryphp">trunk/tests/phpunit/tests/term/query.php</a></li>
<li><a href="#trunktestsphpunitteststermtaxQueryphp">trunk/tests/phpunit/tests/term/taxQuery.php</a></li>
<li><a href="#trunktestsphpunitteststermwpGetObjectTermsphp">trunk/tests/phpunit/tests/term/wpGetObjectTerms.php</a></li>
<li><a href="#trunktestsphpunitteststermwpSetObjectTermsphp">trunk/tests/phpunit/tests/term/wpSetObjectTerms.php</a></li>
<li><a href="#trunktestsphpunitteststermphp">trunk/tests/phpunit/tests/term.php</a></li>
<li><a href="#trunktestsphpunitteststhemewpThemeGetAllowedFiltersphp">trunk/tests/phpunit/tests/theme/wpThemeGetAllowedFilters.php</a></li>
<li><a href="#trunktestsphpunittestsuserqueryphp">trunk/tests/phpunit/tests/user/query.php</a></li>
<li><a href="#trunktestsphpunittestsuserphp">trunk/tests/phpunit/tests/user.php</a></li>
<li><a href="#trunktestsphpunittestswidgetsphp">trunk/tests/phpunit/tests/widgets.php</a></li>
<li><a href="#trunktestsphpunittestswpphp">trunk/tests/phpunit/tests/wp.php</a></li>
<li><a href="#trunktestsphpunittestsxmlrpcmtgetRecentPostTitlesphp">trunk/tests/phpunit/tests/xmlrpc/mt/getRecentPostTitles.php</a></li>
<li><a href="#trunktestsphpunittestsxmlrpcmwgetRecentPostsphp">trunk/tests/phpunit/tests/xmlrpc/mw/getRecentPosts.php</a></li>
<li><a href="#trunktestsphpunittestsxmlrpcwpeditPostphp">trunk/tests/phpunit/tests/xmlrpc/wp/editPost.php</a></li>
<li><a href="#trunktestsphpunittestsxmlrpcwpgetPostphp">trunk/tests/phpunit/tests/xmlrpc/wp/getPost.php</a></li>
<li><a href="#trunktestsphpunittestsxmlrpcwpgetPostTypesphp">trunk/tests/phpunit/tests/xmlrpc/wp/getPostTypes.php</a></li>
<li><a href="#trunktestsphpunittestsxmlrpcwpgetPostsphp">trunk/tests/phpunit/tests/xmlrpc/wp/getPosts.php</a></li>
<li><a href="#trunktestsphpunittestsxmlrpcwpgetTermsphp">trunk/tests/phpunit/tests/xmlrpc/wp/getTerms.php</a></li>
<li><a href="#trunktestsphpunittestsxmlrpcwpgetUsersphp">trunk/tests/phpunit/tests/xmlrpc/wp/getUsers.php</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunktestsphpunittestsadminincludesScreenphp"></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/admin/includesScreen.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/admin/includesScreen.php 2021-07-07 01:04:06 UTC (rev 51366)
+++ trunk/tests/phpunit/tests/admin/includesScreen.php 2021-07-07 10:32:56 UTC (rev 51367)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -391,7 +391,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame( $screen->get_help_tab( $tab_4 ), $tab_4_args );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $tabs = $screen->get_help_tabs();
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( 4, count( $tabs ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 4, $tabs );
</ins><span class="cx" style="display: block; padding: 0 10px"> $this->assertArrayHasKey( $tab_1, $tabs );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertArrayHasKey( $tab_2, $tabs );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertArrayHasKey( $tab_3, $tabs );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -411,19 +411,19 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $screen->remove_help_tab( $tab_1 );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertNull( $screen->get_help_tab( $tab_1 ) );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( 3, count( $screen->get_help_tabs() ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 3, $screen->get_help_tabs() );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $screen->remove_help_tab( $tab_2 );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertNull( $screen->get_help_tab( $tab_2 ) );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( 2, count( $screen->get_help_tabs() ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 2, $screen->get_help_tabs() );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $screen->remove_help_tab( $tab_3 );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertNull( $screen->get_help_tab( $tab_3 ) );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( 1, count( $screen->get_help_tabs() ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 1, $screen->get_help_tabs() );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $screen->remove_help_tab( $tab_4 );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertNull( $screen->get_help_tab( $tab_4 ) );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( 0, count( $screen->get_help_tabs() ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 0, $screen->get_help_tabs() );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $screen->remove_help_tabs();
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame( array(), $screen->get_help_tabs() );
</span></span></pre></div>
<a id="trunktestsphpunittestsajaxCustomizeMenusphp"></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/ajax/CustomizeMenus.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/ajax/CustomizeMenus.php 2021-07-07 01:04:06 UTC (rev 51366)
+++ trunk/tests/phpunit/tests/ajax/CustomizeMenus.php 2021-07-07 10:32:56 UTC (rev 51367)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -579,7 +579,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( isset( $post_args['search'] ) && 'test' === $post_args['search'] ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertTrue( $response['success'] );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( 6, count( $response['data']['items'] ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 6, $response['data']['items'] );
</ins><span class="cx" style="display: block; padding: 0 10px"> $item_ids = wp_list_pluck( $response['data']['items'], 'id' );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertContains( 'post-' . $included_auto_draft_post->ID, $item_ids );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertNotContains( 'post-' . $excluded_auto_draft_post->ID, $item_ids );
</span></span></pre></div>
<a id="trunktestsphpunittestsblocksblocklistphp"></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/block-list.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/blocks/block-list.php 2021-07-07 01:04:06 UTC (rev 51366)
+++ trunk/tests/phpunit/tests/blocks/block-list.php 2021-07-07 10:32:56 UTC (rev 51367)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -106,7 +106,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $context = array();
</span><span class="cx" style="display: block; padding: 0 10px"> $blocks = new WP_Block_List( $parsed_blocks, $context, $this->registry );
</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( 1, count( $blocks ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 1, $blocks );
</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="trunktestsphpunittestscategoryphp"></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/category.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/category.php 2021-07-07 01:04:06 UTC (rev 51366)
+++ trunk/tests/phpunit/tests/category.php 2021-07-07 10:32:56 UTC (rev 51367)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -29,7 +29,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Validate length is 1 + created due to uncategorized.
</span><span class="cx" style="display: block; padding: 0 10px"> $cat_ids = get_all_category_ids();
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( 3, count( $cat_ids ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 3, $cat_ids );
</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="trunktestsphpunittestscommentgetCommentExcerptphp"></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/comment/getCommentExcerpt.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/comment/getCommentExcerpt.php 2021-07-07 01:04:06 UTC (rev 51366)
+++ trunk/tests/phpunit/tests/comment/getCommentExcerpt.php 2021-07-07 10:32:56 UTC (rev 51367)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -16,7 +16,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $excerpt = get_comment_excerpt( $comment_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->assertSame( 20, count( explode( ' ', $excerpt ) ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 20, explode( ' ', $excerpt ) );
</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_comment_excerpt_filtered() {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -30,7 +30,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $excerpt = get_comment_excerpt( $comment_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->assertSame( 10, count( explode( ' ', $excerpt ) ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 10, explode( ' ', $excerpt ) );
</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 _filter_comment_excerpt_length() {
</span></span></pre></div>
<a id="trunktestsphpunittestscommentqueryphp"></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/comment/query.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/comment/query.php 2021-07-07 01:04:06 UTC (rev 51366)
+++ trunk/tests/phpunit/tests/comment/query.php 2021-07-07 10:32:56 UTC (rev 51367)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1291,7 +1291,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> self::factory()->comment->create_post_comments( $post_id, $limit );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $comments = get_comments( array( 'post_id' => $post_id ) );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( $limit, count( $comments ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( $limit, $comments );
</ins><span class="cx" style="display: block; padding: 0 10px"> foreach ( $comments as $comment ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertEquals( $post_id, $comment->comment_post_ID );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1300,7 +1300,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> self::factory()->comment->create_post_comments( $post_id2, $limit );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $comments = get_comments( array( 'post_id' => $post_id2 ) );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( $limit, count( $comments ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( $limit, $comments );
</ins><span class="cx" style="display: block; padding: 0 10px"> foreach ( $comments as $comment ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertEquals( $post_id2, $comment->comment_post_ID );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1309,7 +1309,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> self::factory()->comment->create_post_comments( $post_id3, $limit, array( 'comment_approved' => '0' ) );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $comments = get_comments( array( 'post_id' => $post_id3 ) );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( $limit, count( $comments ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( $limit, $comments );
</ins><span class="cx" style="display: block; padding: 0 10px"> foreach ( $comments as $comment ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertEquals( $post_id3, $comment->comment_post_ID );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1320,7 +1320,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 'status' => 'hold',
</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( $limit, count( $comments ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( $limit, $comments );
</ins><span class="cx" style="display: block; padding: 0 10px"> foreach ( $comments as $comment ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertEquals( $post_id3, $comment->comment_post_ID );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1331,11 +1331,11 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 'status' => 'approve',
</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( 0, count( $comments ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 0, $comments );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> self::factory()->comment->create_post_comments( $post_id3, $limit, array( 'comment_approved' => '1' ) );
</span><span class="cx" style="display: block; padding: 0 10px"> $comments = get_comments( array( 'post_id' => $post_id3 ) );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( $limit * 2, count( $comments ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( $limit * 2, $comments );
</ins><span class="cx" style="display: block; padding: 0 10px"> foreach ( $comments as $comment ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertEquals( $post_id3, $comment->comment_post_ID );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1362,7 +1362,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 'orderby' => array( 'key' ),
</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( 2, count( $comments ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 2, $comments );
</ins><span class="cx" style="display: block; padding: 0 10px"> $this->assertEquals( $comment_id2, $comments[0]->comment_ID );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertEquals( $comment_id, $comments[1]->comment_ID );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1372,7 +1372,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 'orderby' => array( 'meta_value' ),
</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( 2, count( $comments ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 2, $comments );
</ins><span class="cx" style="display: block; padding: 0 10px"> $this->assertEquals( $comment_id2, $comments[0]->comment_ID );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertEquals( $comment_id, $comments[1]->comment_ID );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1383,7 +1383,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 'order' => 'ASC',
</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( 2, count( $comments ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 2, $comments );
</ins><span class="cx" style="display: block; padding: 0 10px"> $this->assertEquals( $comment_id, $comments[0]->comment_ID );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertEquals( $comment_id2, $comments[1]->comment_ID );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1394,7 +1394,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 'order' => 'ASC',
</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( 2, count( $comments ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 2, $comments );
</ins><span class="cx" style="display: block; padding: 0 10px"> $this->assertEquals( $comment_id, $comments[0]->comment_ID );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertEquals( $comment_id2, $comments[1]->comment_ID );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1422,7 +1422,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 'orderby' => array( 'key' ),
</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( 1, count( $comments ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 1, $comments );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $comments = get_comments(
</span><span class="cx" style="display: block; padding: 0 10px"> array(
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1430,7 +1430,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 'orderby' => array( 'meta_value' ),
</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( 1, count( $comments ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 1, $comments );
</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="trunktestsphpunittestscommentphp"></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/comment.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/comment.php 2021-07-07 01:04:06 UTC (rev 51366)
+++ trunk/tests/phpunit/tests/comment.php 2021-07-07 10:32:56 UTC (rev 51367)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1265,10 +1265,10 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertTrue( $actual['done'] );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Number of exported comments.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( 1, count( $actual['data'] ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 1, $actual['data'] );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Number of exported comment properties.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( 8, count( $actual['data'][0]['data'] ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 8, $actual['data'][0]['data'] );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Exported group.
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame( 'comments', $actual['data'][0]['group_id'] );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1328,10 +1328,10 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertTrue( $actual['done'] );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Number of exported comments.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( 1, count( $actual['data'] ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 1, $actual['data'] );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Number of exported comment properties.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( 7, count( $actual['data'][0]['data'] ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 7, $actual['data'][0]['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">@@ -1359,6 +1359,6 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertTrue( $actual['done'] );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Number of exported comments.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( 0, count( $actual['data'] ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 0, $actual['data'] );
</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="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 2021-07-07 01:04:06 UTC (rev 51366)
+++ trunk/tests/phpunit/tests/feed/rss2.php 2021-07-07 10:32:56 UTC (rev 51367)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -106,7 +106,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $rss = xml_find( $xml, 'rss' );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // There should only be one <rss> child element.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( 1, count( $rss ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 1, $rss );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame( '2.0', $rss[0]['attributes']['version'] );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame( 'http://purl.org/rss/1.0/modules/content/', $rss[0]['attributes']['xmlns:content'] );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -114,7 +114,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame( 'http://purl.org/dc/elements/1.1/', $rss[0]['attributes']['xmlns:dc'] );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // RSS should have exactly one child element (channel).
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( 1, count( $rss[0]['child'] ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 1, $rss[0]['child'] );
</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">@@ -320,7 +320,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $rss = xml_find( $xml, 'rss' );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // There should only be one <rss> child element.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( 1, count( $rss ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 1, $rss );
</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">@@ -348,7 +348,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $rss = xml_find( $xml, 'rss' );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // There should only be one <rss> child element.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( 1, count( $rss ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 1, $rss );
</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">@@ -381,7 +381,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $rss = xml_find( $xml, 'rss' );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // There should only be one <rss> child element.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( 1, count( $rss ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 1, $rss );
</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">@@ -409,7 +409,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $rss = xml_find( $xml, 'rss' );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // There should only be one <rss> child element.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( 1, count( $rss ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 1, $rss );
</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">@@ -437,7 +437,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $rss = xml_find( $xml, 'rss' );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // There should only be one <rss> child element.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( 1, count( $rss ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 1, $rss );
</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">@@ -465,7 +465,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $rss = xml_find( $xml, 'rss' );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // There should only be one <rss> child element.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( 1, count( $rss ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 1, $rss );
</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="trunktestsphpunittestsfunctionswpListFilterphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/tests/functions/wpListFilter.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/functions/wpListFilter.php 2021-07-07 01:04:06 UTC (rev 51366)
+++ trunk/tests/phpunit/tests/functions/wpListFilter.php 2021-07-07 10:32:56 UTC (rev 51367)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -51,7 +51,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> ),
</span><span class="cx" style="display: block; padding: 0 10px"> 'AND'
</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( 2, count( $list ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 2, $list );
</ins><span class="cx" style="display: block; padding: 0 10px"> $this->assertArrayHasKey( 'foo', $list );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertArrayHasKey( 'bar', $list );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -65,7 +65,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> ),
</span><span class="cx" style="display: block; padding: 0 10px"> 'OR'
</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( 3, count( $list ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 3, $list );
</ins><span class="cx" style="display: block; padding: 0 10px"> $this->assertArrayHasKey( 'foo', $list );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertArrayHasKey( 'bar', $list );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertArrayHasKey( 'baz', $list );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -80,7 +80,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> ),
</span><span class="cx" style="display: block; padding: 0 10px"> 'NOT'
</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( 1, count( $list ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 1, $list );
</ins><span class="cx" style="display: block; padding: 0 10px"> $this->assertArrayHasKey( 'baz', $list );
</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">@@ -288,13 +288,13 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> function test_filter_object_list_nested_array_and() {
</span><span class="cx" style="display: block; padding: 0 10px"> $list = wp_filter_object_list( $this->object_list, array( 'field4' => array( 'blue' ) ), 'AND' );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( 1, count( $list ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 1, $list );
</ins><span class="cx" style="display: block; padding: 0 10px"> $this->assertArrayHasKey( 'baz', $list );
</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"> function test_filter_object_list_nested_array_not() {
</span><span class="cx" style="display: block; padding: 0 10px"> $list = wp_filter_object_list( $this->object_list, array( 'field4' => array( 'red' ) ), 'NOT' );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( 2, count( $list ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 2, $list );
</ins><span class="cx" style="display: block; padding: 0 10px"> $this->assertArrayHasKey( 'bar', $list );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertArrayHasKey( 'baz', $list );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -308,7 +308,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> ),
</span><span class="cx" style="display: block; padding: 0 10px"> 'OR'
</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( 2, count( $list ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 2, $list );
</ins><span class="cx" style="display: block; padding: 0 10px"> $this->assertArrayHasKey( 'foo', $list );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertArrayHasKey( 'baz', $list );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -315,7 +315,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> function test_filter_object_list_nested_array_or_singular() {
</span><span class="cx" style="display: block; padding: 0 10px"> $list = wp_filter_object_list( $this->object_list, array( 'field4' => array( 'blue' ) ), 'OR' );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( 1, count( $list ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 1, $list );
</ins><span class="cx" style="display: block; padding: 0 10px"> $this->assertArrayHasKey( 'baz', $list );
</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="trunktestsphpunittestsimportimportphp"></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/import/import.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/import/import.php 2021-07-07 01:04:06 UTC (rev 51366)
+++ trunk/tests/phpunit/tests/import/import.php 2021-07-07 10:32:56 UTC (rev 51367)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -85,7 +85,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 'orderby' => 'ID',
</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( 11, count( $posts ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 11, $posts );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $post = $posts[0];
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame( 'Many Categories', $post->post_title );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -95,7 +95,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame( 'publish', $post->post_status );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame( 0, $post->post_parent );
</span><span class="cx" style="display: block; padding: 0 10px"> $cats = wp_get_post_categories( $post->ID );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( 27, count( $cats ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 27, $cats );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $post = $posts[1];
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame( 'Non-standard post format', $post->post_title );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -105,7 +105,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame( 'publish', $post->post_status );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame( 0, $post->post_parent );
</span><span class="cx" style="display: block; padding: 0 10px"> $cats = wp_get_post_categories( $post->ID );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( 1, count( $cats ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 1, $cats );
</ins><span class="cx" style="display: block; padding: 0 10px"> $this->assertTrue( has_post_format( 'aside', $post->ID ) );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $post = $posts[2];
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -116,7 +116,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame( 'publish', $post->post_status );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame( 0, $post->post_parent );
</span><span class="cx" style="display: block; padding: 0 10px"> $cats = wp_get_post_categories( $post->ID, array( 'fields' => 'all' ) );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( 1, count( $cats ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 1, $cats );
</ins><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame( 'foo', $cats[0]->slug );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $post = $posts[3];
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -127,7 +127,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame( 'publish', $post->post_status );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame( 0, $post->post_parent );
</span><span class="cx" style="display: block; padding: 0 10px"> $cats = wp_get_post_categories( $post->ID, array( 'fields' => 'all' ) );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( 1, count( $cats ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 1, $cats );
</ins><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame( 'foo-bar', $cats[0]->slug );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $post = $posts[4];
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -138,9 +138,9 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame( 'private', $post->post_status );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame( 0, $post->post_parent );
</span><span class="cx" style="display: block; padding: 0 10px"> $cats = wp_get_post_categories( $post->ID );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( 1, count( $cats ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 1, $cats );
</ins><span class="cx" style="display: block; padding: 0 10px"> $tags = wp_get_post_tags( $post->ID );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( 3, count( $tags ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 3, $tags );
</ins><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame( 'tag1', $tags[0]->slug );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame( 'tag2', $tags[1]->slug );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame( 'tag3', $tags[2]->slug );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -198,7 +198,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame( 'publish', $post->post_status );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame( 0, $post->post_parent );
</span><span class="cx" style="display: block; padding: 0 10px"> $cats = wp_get_post_categories( $post->ID );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( 1, count( $cats ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 1, $cats );
</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"> function test_double_import() {
</span></span></pre></div>
<a id="trunktestsphpunittestsimportparserphp"></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/import/parser.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/import/parser.php 2021-07-07 01:04:06 UTC (rev 51366)
+++ trunk/tests/phpunit/tests/import/parser.php 2021-07-07 10:32:56 UTC (rev 51367)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -106,9 +106,9 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $message
</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( 2, count( $result['posts'] ), $message );
- $this->assertSame( 19, count( $result['posts'][0] ), $message );
- $this->assertSame( 18, count( $result['posts'][1] ), $message );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 2, $result['posts'], $message );
+ $this->assertCount( 19, $result['posts'][0], $message );
+ $this->assertCount( 18, $result['posts'][1], $message );
</ins><span class="cx" style="display: block; padding: 0 10px"> $this->assertEquals(
</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="lines" style="display: block; padding: 0 10px; color: #888">@@ -160,9 +160,9 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame( $result['tags'][0]['tag_slug'], 'chicken', $message );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame( $result['tags'][0]['tag_name'], 'chicken', $message );
</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( 6, count( $result['posts'] ), $message );
- $this->assertSame( 19, count( $result['posts'][0] ), $message );
- $this->assertSame( 18, count( $result['posts'][1] ), $message );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 6, $result['posts'], $message );
+ $this->assertCount( 19, $result['posts'][0], $message );
+ $this->assertCount( 18, $result['posts'][1], $message );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertEquals(
</span><span class="cx" style="display: block; padding: 0 10px"> array(
</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 2021-07-07 01:04:06 UTC (rev 51366)
+++ trunk/tests/phpunit/tests/meta.php 2021-07-07 10:32:56 UTC (rev 51367)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -100,7 +100,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $this->updated_mids = array();
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> foreach ( $found as $action => $mids ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( 2, count( $mids ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 2, $mids );
</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">@@ -137,7 +137,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->assertSame( 1, count( $u ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 1, $u );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // User found is not locally defined author (it's the admin).
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertNotEquals( $this->author->user_login, $u[0]->user_login );
</span></span></pre></div>
<a id="trunktestsphpunittestsmultisitenetworkQueryphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/tests/multisite/networkQuery.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/multisite/networkQuery.php 2021-07-07 01:04:06 UTC (rev 51366)
+++ trunk/tests/phpunit/tests/multisite/networkQuery.php 2021-07-07 10:32:56 UTC (rev 51367)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -70,7 +70,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->assertSame( 3, count( $found ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 3, $found );
</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_wp_network_query_by_network__in_with_order() {
</span></span></pre></div>
<a id="trunktestsphpunittestsmultisitesiteQueryphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/tests/multisite/siteQuery.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/multisite/siteQuery.php 2021-07-07 01:04:06 UTC (rev 51366)
+++ trunk/tests/phpunit/tests/multisite/siteQuery.php 2021-07-07 10:32:56 UTC (rev 51367)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -135,7 +135,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->assertSame( 3, count( $found ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 3, $found );
</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_wp_site_query_by_site__in_with_single_id() {
</span></span></pre></div>
<a id="trunktestsphpunittestspomomophp"></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/pomo/mo.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/pomo/mo.php 2021-07-07 01:04:06 UTC (rev 51366)
+++ trunk/tests/phpunit/tests/pomo/mo.php 2021-07-07 10:32:56 UTC (rev 51367)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -15,7 +15,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> ),
</span><span class="cx" style="display: block; padding: 0 10px"> $mo->headers
</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( 2, count( $mo->entries ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 2, $mo->entries );
</ins><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame( array( 'dyado' ), $mo->entries['baba']->translations );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame( array( 'yes' ), $mo->entries["kuku\nruku"]->translations );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -23,7 +23,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> function test_mo_plural() {
</span><span class="cx" style="display: block; padding: 0 10px"> $mo = new MO();
</span><span class="cx" style="display: block; padding: 0 10px"> $mo->import_from_file( DIR_TESTDATA . '/pomo/plural.mo' );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( 1, count( $mo->entries ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 1, $mo->entries );
</ins><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame( array( 'oney dragoney', 'twoey dragoney', 'manyey dragoney', 'manyeyey dragoney', 'manyeyeyey dragoney' ), $mo->entries['one dragon']->translations );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame( 'oney dragoney', $mo->translate_plural( 'one dragon', '%d dragons', 1 ) );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -49,7 +49,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> function test_mo_context() {
</span><span class="cx" style="display: block; padding: 0 10px"> $mo = new MO();
</span><span class="cx" style="display: block; padding: 0 10px"> $mo->import_from_file( DIR_TESTDATA . '/pomo/context.mo' );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( 2, count( $mo->entries ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 2, $mo->entries );
</ins><span class="cx" style="display: block; padding: 0 10px"> $plural_entry = new Translation_Entry(
</span><span class="cx" style="display: block; padding: 0 10px"> array(
</span><span class="cx" style="display: block; padding: 0 10px"> 'singular' => 'one dragon',
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -81,7 +81,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $guest->add_entry( new Translation_Entry( array( 'singular' => 'green' ) ) );
</span><span class="cx" style="display: block; padding: 0 10px"> $guest->add_entry( new Translation_Entry( array( 'singular' => 'red' ) ) );
</span><span class="cx" style="display: block; padding: 0 10px"> $host->merge_with( $guest );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( 3, count( $host->entries ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 3, $host->entries );
</ins><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame( array(), array_diff( array( 'pink', 'green', 'red' ), array_keys( $host->entries ) ) );
</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">@@ -159,7 +159,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $again = new MO();
</span><span class="cx" style="display: block; padding: 0 10px"> $again->import_from_file( $temp_fn );
</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( 0, count( $again->entries ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 0, $again->entries );
</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"> function test_nplurals_with_backslashn() {
</span></span></pre></div>
<a id="trunktestsphpunittestspomopophp"></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/pomo/po.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/pomo/po.php 2021-07-07 01:04:06 UTC (rev 51366)
+++ trunk/tests/phpunit/tests/pomo/po.php 2021-07-07 10:32:56 UTC (rev 51367)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -317,7 +317,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> function test_import_from_file_with_windows_line_endings_should_work_as_with_unix_line_endings() {
</span><span class="cx" style="display: block; padding: 0 10px"> $po = new PO();
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertTrue( $po->import_from_file( DIR_TESTDATA . '/pomo/windows-line-endings.po' ) );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( 1, count( $po->entries ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 1, $po->entries );
</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"> // TODO: Add tests for bad files.
</span></span></pre></div>
<a id="trunktestsphpunittestspostformatsphp"></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/formats.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/post/formats.php 2021-07-07 01:04:06 UTC (rev 51366)
+++ trunk/tests/phpunit/tests/post/formats.php 2021-07-07 10:32:56 UTC (rev 51367)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -13,7 +13,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $result = set_post_format( $post_id, 'aside' );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertNotWPError( $result );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertIsArray( $result );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( 1, count( $result ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 1, $result );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $format = get_post_format( $post_id );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame( 'aside', $format );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -21,12 +21,12 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $result = set_post_format( $post_id, 'standard' );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertNotWPError( $result );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertIsArray( $result );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( 0, count( $result ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 0, $result );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $result = set_post_format( $post_id, '' );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertNotWPError( $result );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertIsArray( $result );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( 0, count( $result ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 0, $result );
</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">@@ -41,7 +41,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $result = set_post_format( $post_id, 'aside' );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertNotWPError( $result );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertIsArray( $result );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( 1, count( $result ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 1, $result );
</ins><span class="cx" style="display: block; padding: 0 10px"> // The format can be set but not retrieved until it is registered.
</span><span class="cx" style="display: block; padding: 0 10px"> $format = get_post_format( $post_id );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertFalse( $format );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -54,12 +54,12 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $result = set_post_format( $post_id, 'standard' );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertNotWPError( $result );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertIsArray( $result );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( 0, count( $result ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 0, $result );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $result = set_post_format( $post_id, '' );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertNotWPError( $result );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertIsArray( $result );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( 0, count( $result ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 0, $result );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> remove_post_type_support( 'page', 'post-formats' );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -73,13 +73,13 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $result = set_post_format( $post_id, 'aside' );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertNotWPError( $result );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertIsArray( $result );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( 1, count( $result ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 1, $result );
</ins><span class="cx" style="display: block; padding: 0 10px"> $this->assertTrue( has_post_format( 'aside', $post_id ) );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $result = set_post_format( $post_id, 'standard' );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertNotWPError( $result );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertIsArray( $result );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( 0, count( $result ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 0, $result );
</ins><span class="cx" style="display: block; padding: 0 10px"> // Standard is a special case. It shows as false when set.
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertFalse( has_post_format( 'standard', $post_id ) );
</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 2021-07-07 01:04:06 UTC (rev 51366)
+++ trunk/tests/phpunit/tests/post/getPages.php 2021-07-07 10:32:56 UTC (rev 51367)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -16,7 +16,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertFalse( wp_cache_get( 'last_changed', 'posts' ) );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $pages = get_pages();
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( 3, count( $pages ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 3, $pages );
</ins><span class="cx" style="display: block; padding: 0 10px"> $time1 = wp_cache_get( 'last_changed', 'posts' );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertNotEmpty( $time1 );
</span><span class="cx" style="display: block; padding: 0 10px"> $num_queries = $wpdb->num_queries;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -26,7 +26,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Again. num_queries and last_changed should remain the same.
</span><span class="cx" style="display: block; padding: 0 10px"> $pages = get_pages();
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( 3, count( $pages ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 3, $pages );
</ins><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame( $time1, wp_cache_get( 'last_changed', 'posts' ) );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame( $num_queries, $wpdb->num_queries );
</span><span class="cx" style="display: block; padding: 0 10px"> foreach ( $pages as $page ) {
</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"> // Again with different args. last_changed should not increment because of
</span><span class="cx" style="display: block; padding: 0 10px"> // different args to get_pages(). num_queries should bump by 1.
</span><span class="cx" style="display: block; padding: 0 10px"> $pages = get_pages( array( 'number' => 2 ) );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( 2, count( $pages ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 2, $pages );
</ins><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame( $time1, wp_cache_get( 'last_changed', 'posts' ) );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame( $num_queries + 1, $wpdb->num_queries );
</span><span class="cx" style="display: block; padding: 0 10px"> foreach ( $pages as $page ) {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -47,7 +47,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Again. num_queries and last_changed should remain the same.
</span><span class="cx" style="display: block; padding: 0 10px"> $pages = get_pages( array( 'number' => 2 ) );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( 2, count( $pages ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 2, $pages );
</ins><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame( $time1, wp_cache_get( 'last_changed', 'posts' ) );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame( $num_queries, $wpdb->num_queries );
</span><span class="cx" style="display: block; padding: 0 10px"> foreach ( $pages as $page ) {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -56,7 +56,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Do the first query again. The interim queries should not affect it.
</span><span class="cx" style="display: block; padding: 0 10px"> $pages = get_pages();
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( 3, count( $pages ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 3, $pages );
</ins><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame( $time1, wp_cache_get( 'last_changed', 'posts' ) );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame( $num_queries, $wpdb->num_queries );
</span><span class="cx" style="display: block; padding: 0 10px"> foreach ( $pages as $page ) {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -71,7 +71,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // last_changed bumped so num_queries should increment.
</span><span class="cx" style="display: block; padding: 0 10px"> $pages = get_pages( array( 'number' => 2 ) );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( 2, count( $pages ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 2, $pages );
</ins><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame( $time2, wp_cache_get( 'last_changed', 'posts' ) );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame( $num_queries + 1, $wpdb->num_queries );
</span><span class="cx" style="display: block; padding: 0 10px"> foreach ( $pages as $page ) {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -91,7 +91,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // num_queries should bump after wp_delete_post() bumps last_changed.
</span><span class="cx" style="display: block; padding: 0 10px"> $pages = get_pages();
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( 2, count( $pages ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 2, $pages );
</ins><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame( $last_changed, wp_cache_get( 'last_changed', 'posts' ) );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame( $num_queries + 1, $wpdb->num_queries );
</span><span class="cx" style="display: block; padding: 0 10px"> foreach ( $pages as $page ) {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -277,7 +277,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->assertSame( 3, count( get_pages( array( 'meta_key' => 'some-meta-key' ) ) ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 3, get_pages( array( 'meta_key' => 'some-meta-key' ) ) );
</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">@@ -372,7 +372,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> preg_match_all( '#<option#', wp_dropdown_pages( 'echo=0' ), $matches );
</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( 5, count( $matches[0] ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 5, $matches[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></span></pre></div>
<a id="trunktestsphpunittestspostobjectsphp"></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/objects.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/post/objects.php 2021-07-07 01:04:06 UTC (rev 51366)
+++ trunk/tests/phpunit/tests/post/objects.php 2021-07-07 10:32:56 UTC (rev 51367)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -113,17 +113,17 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $post = get_post( $post_id );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertIsArray( $post->post_category );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( 1, count( $post->post_category ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 1, $post->post_category );
</ins><span class="cx" style="display: block; padding: 0 10px"> $this->assertEquals( get_option( 'default_category' ), $post->post_category[0] );
</span><span class="cx" style="display: block; padding: 0 10px"> $term1 = wp_insert_term( 'Foo', 'category' );
</span><span class="cx" style="display: block; padding: 0 10px"> $term2 = wp_insert_term( 'Bar', 'category' );
</span><span class="cx" style="display: block; padding: 0 10px"> $term3 = wp_insert_term( 'Baz', 'category' );
</span><span class="cx" style="display: block; padding: 0 10px"> wp_set_post_categories( $post_id, array( $term1['term_id'], $term2['term_id'], $term3['term_id'] ) );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( 3, count( $post->post_category ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 3, $post->post_category );
</ins><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame( array( $term2['term_id'], $term3['term_id'], $term1['term_id'] ), $post->post_category );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $post = get_post( $post_id, ARRAY_A );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( 3, count( $post['post_category'] ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 3, $post['post_category'] );
</ins><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame( array( $term2['term_id'], $term3['term_id'], $term1['term_id'] ), $post['post_category'] );
</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">@@ -135,12 +135,12 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertEmpty( $post->tags_input );
</span><span class="cx" style="display: block; padding: 0 10px"> wp_set_post_tags( $post_id, 'Foo, Bar, Baz' );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertIsArray( $post->tags_input );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( 3, count( $post->tags_input ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 3, $post->tags_input );
</ins><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame( array( 'Bar', 'Baz', 'Foo' ), $post->tags_input );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $post = get_post( $post_id, ARRAY_A );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertIsArray( $post['tags_input'] );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( 3, count( $post['tags_input'] ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 3, $post['tags_input'] );
</ins><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame( array( 'Bar', 'Baz', 'Foo' ), $post['tags_input'] );
</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="trunktestsphpunittestspostqueryphp"></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/query.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/post/query.php 2021-07-07 01:04:06 UTC (rev 51366)
+++ trunk/tests/phpunit/tests/post/query.php 2021-07-07 10:32:56 UTC (rev 51367)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -96,7 +96,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"> // Fourth post added in filter.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( 4, count( $query->posts ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 4, $query->posts );
</ins><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame( 4, $query->post_count );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> foreach ( $query->posts as $post ) {
</span></span></pre></div>
<a id="trunktestsphpunittestsposttypesphp"></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/types.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/post/types.php 2021-07-07 01:04:06 UTC (rev 51366)
+++ trunk/tests/phpunit/tests/post/types.php 2021-07-07 10:32:56 UTC (rev 51367)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -349,7 +349,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertTrue( unregister_post_type( 'foo' ) );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertNotContains( '%foo%', $wp_rewrite->rewritecode );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertNotContains( 'bar=', $wp_rewrite->queryreplace );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( --$count_before, count( $wp_rewrite->rewritereplace ) ); // Array was reduced by one value.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( --$count_before, $wp_rewrite->rewritereplace ); // Array was reduced by one 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">@@ -461,7 +461,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"> $this->assertArrayHasKey( 'future_foo', $wp_filter );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( 1, count( $wp_filter['future_foo']->callbacks ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 1, $wp_filter['future_foo']->callbacks );
</ins><span class="cx" style="display: block; padding: 0 10px"> $this->assertTrue( unregister_post_type( 'foo' ) );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertArrayNotHasKey( 'future_foo', $wp_filter );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -481,7 +481,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"> $this->assertArrayHasKey( 'add_meta_boxes_foo', $wp_filter );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( 1, count( $wp_filter['add_meta_boxes_foo']->callbacks ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 1, $wp_filter['add_meta_boxes_foo']->callbacks );
</ins><span class="cx" style="display: block; padding: 0 10px"> $this->assertTrue( unregister_post_type( 'foo' ) );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertArrayNotHasKey( 'add_meta_boxes_foo', $wp_filter );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</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-07-07 01:04:06 UTC (rev 51366)
+++ trunk/tests/phpunit/tests/post.php 2021-07-07 10:32:56 UTC (rev 51367)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -98,12 +98,12 @@
</span><span class="cx" style="display: block; padding: 0 10px"> update_object_term_cache( $id, $post_type );
</span><span class="cx" style="display: block; padding: 0 10px"> $tcache = wp_cache_get( $id, 'post_tag_relationships' );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertIsArray( $tcache );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( 2, count( $tcache ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 2, $tcache );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $tcache = wp_cache_get( $id, 'ctax_relationships' );
</span><span class="cx" style="display: block; padding: 0 10px"> if ( 'cpt' === $post_type ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertIsArray( $tcache );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( 2, count( $tcache ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 2, $tcache );
</ins><span class="cx" style="display: block; padding: 0 10px"> } else {
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertFalse( $tcache );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -917,7 +917,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"> preg_match_all( '|href="([^"]+)"|', $wp_tag_cloud, $matches );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( 1, count( $matches[1] ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 1, $matches[1] );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $terms = get_terms( $tax );
</span><span class="cx" style="display: block; padding: 0 10px"> $term = reset( $terms );
</span></span></pre></div>
<a id="trunktestsphpunittestsquerymetaQueryphp"></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/query/metaQuery.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/query/metaQuery.php 2021-07-07 01:04:06 UTC (rev 51366)
+++ trunk/tests/phpunit/tests/query/metaQuery.php 2021-07-07 10:32:56 UTC (rev 51367)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -696,7 +696,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->assertSame( 0, count( $query->posts ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 0, $query->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">@@ -1534,7 +1534,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"> $query = new WP_Query( $args );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( 2, count( $query->posts ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 2, $query->posts );
</ins><span class="cx" style="display: block; padding: 0 10px"> foreach ( $query->posts as $post ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertInstanceOf( 'WP_Post', $post );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame( 'raw', $post->filter );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1550,7 +1550,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $query = new WP_Query( $args );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( 3, count( $query->posts ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 3, $query->posts );
</ins><span class="cx" style="display: block; padding: 0 10px"> foreach ( $query->posts as $post ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertInstanceOf( 'WP_Post', $post );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame( 'raw', $post->filter );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1582,7 +1582,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->assertSame( 2, count( $posts ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 2, $posts );
</ins><span class="cx" style="display: block; padding: 0 10px"> $posts = wp_list_pluck( $posts, 'ID' );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertSameSets( array( $post_id, $post_id3 ), $posts );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1594,7 +1594,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->assertSame( 2, count( $posts ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 2, $posts );
</ins><span class="cx" style="display: block; padding: 0 10px"> foreach ( $posts as $post ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertInstanceOf( 'WP_Post', $post );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame( 'raw', $post->filter );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1625,7 +1625,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"> $posts = get_posts( $args );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( 2, count( $posts ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 2, $posts );
</ins><span class="cx" style="display: block; padding: 0 10px"> foreach ( $posts as $post ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertInstanceOf( 'WP_Post', $post );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame( 'raw', $post->filter );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1659,7 +1659,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 'meta_value' => '0',
</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( 1, count( $q->posts ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 1, $q->posts );
</ins><span class="cx" style="display: block; padding: 0 10px"> foreach ( $q->posts as $post ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertInstanceOf( 'WP_Post', $post );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame( 'raw', $post->filter );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1672,7 +1672,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 'meta_value' => '0',
</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( 2, count( $posts ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 2, $posts );
</ins><span class="cx" style="display: block; padding: 0 10px"> foreach ( $posts as $post ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertInstanceOf( 'WP_Post', $post );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame( 'raw', $post->filter );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1686,7 +1686,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 'meta_value' => 0,
</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( 2, count( $posts ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 2, $posts );
</ins><span class="cx" style="display: block; padding: 0 10px"> foreach ( $posts as $post ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertInstanceOf( 'WP_Post', $post );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame( 'raw', $post->filter );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1695,7 +1695,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertSameSets( array( $post_id, $post_id5 ), $posts );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $posts = get_posts( array( 'meta_value' => 0 ) );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( 5, count( $posts ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 5, $posts );
</ins><span class="cx" style="display: block; padding: 0 10px"> foreach ( $posts as $post ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertInstanceOf( 'WP_Post', $post );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame( 'raw', $post->filter );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1704,7 +1704,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertSameSets( array( $post_id, $post_id3, $post_id4, $post_id5, $post_id6 ), $posts );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $posts = get_posts( array( 'meta_value' => '0' ) );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( 5, count( $posts ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 5, $posts );
</ins><span class="cx" style="display: block; padding: 0 10px"> foreach ( $posts as $post ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertInstanceOf( 'WP_Post', $post );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame( 'raw', $post->filter );
</span></span></pre></div>
<a id="trunktestsphpunittestsquerytaxQueryphp"></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/query/taxQuery.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/query/taxQuery.php 2021-07-07 01:04:06 UTC (rev 51366)
+++ trunk/tests/phpunit/tests/query/taxQuery.php 2021-07-07 10:32:56 UTC (rev 51367)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1025,7 +1025,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"> $posts = $query->get_posts();
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( 0, count( $posts ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 0, $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">@@ -1060,7 +1060,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"> $posts = $query->get_posts();
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( 0, count( $posts ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 0, $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"> public function test_tax_query_include_children() {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1112,7 +1112,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->assertSame( 4, count( $posts ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 4, $posts );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $posts = get_posts(
</span><span class="cx" style="display: block; padding: 0 10px"> array(
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1130,7 +1130,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->assertSame( 1, count( $posts ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 1, $posts );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $posts = get_posts(
</span><span class="cx" style="display: block; padding: 0 10px"> array(
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1147,7 +1147,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->assertSame( 3, count( $posts ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 3, $posts );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $posts = get_posts(
</span><span class="cx" style="display: block; padding: 0 10px"> array(
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1165,7 +1165,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->assertSame( 1, count( $posts ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 1, $posts );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $posts = get_posts(
</span><span class="cx" style="display: block; padding: 0 10px"> array(
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1182,7 +1182,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->assertSame( 1, count( $posts ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 1, $posts );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $posts = get_posts(
</span><span class="cx" style="display: block; padding: 0 10px"> array(
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1200,7 +1200,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->assertSame( 1, count( $posts ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 1, $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"> public function test_tax_query_taxonomy_with_attachments() {
</span></span></pre></div>
<a id="trunktestsphpunittestsrestapirestattachmentscontrollerphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/tests/rest-api/rest-attachments-controller.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/rest-api/rest-attachments-controller.php 2021-07-07 01:04:06 UTC (rev 51366)
+++ trunk/tests/phpunit/tests/rest-api/rest-attachments-controller.php 2021-07-07 10:32:56 UTC (rev 51367)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -415,13 +415,13 @@
</span><span class="cx" style="display: block; padding: 0 10px"> // All attachments.
</span><span class="cx" style="display: block; padding: 0 10px"> $request = new WP_REST_Request( 'GET', '/wp/v2/media' );
</span><span class="cx" style="display: block; padding: 0 10px"> $response = rest_get_server()->dispatch( $request );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( 2, count( $response->get_data() ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 2, $response->get_data() );
</ins><span class="cx" style="display: block; padding: 0 10px"> $request = new WP_REST_Request( 'GET', '/wp/v2/media' );
</span><span class="cx" style="display: block; padding: 0 10px"> // Attachments without a parent.
</span><span class="cx" style="display: block; padding: 0 10px"> $request->set_param( 'parent', 0 );
</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->assertSame( 1, count( $data ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 1, $data );
</ins><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame( $attachment_id2, $data[0]['id'] );
</span><span class="cx" style="display: block; padding: 0 10px"> // Attachments with parent=post_id.
</span><span class="cx" style="display: block; padding: 0 10px"> $request = new WP_REST_Request( 'GET', '/wp/v2/media' );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -428,7 +428,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $request->set_param( 'parent', $post_id );
</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->assertSame( 1, count( $data ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 1, $data );
</ins><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame( $attachment_id, $data[0]['id'] );
</span><span class="cx" style="display: block; padding: 0 10px"> // Attachments with invalid parent.
</span><span class="cx" style="display: block; padding: 0 10px"> $request = new WP_REST_Request( 'GET', '/wp/v2/media' );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -435,7 +435,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $request->set_param( 'parent', REST_TESTS_IMPOSSIBLY_HIGH_NUMBER );
</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->assertSame( 0, count( $data ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 0, $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_invalid_status_param_is_error_response() {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -509,7 +509,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"> $this->assertSame( 200, $response->get_status() );
</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->assertSame( 2, count( $data ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 2, $data );
</ins><span class="cx" style="display: block; padding: 0 10px"> $ids = array(
</span><span class="cx" style="display: block; padding: 0 10px"> $data[0]['id'],
</span><span class="cx" style="display: block; padding: 0 10px"> $data[1]['id'],
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1465,7 +1465,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $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( 27, count( $properties ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 27, $properties );
</ins><span class="cx" style="display: block; padding: 0 10px"> $this->assertArrayHasKey( 'author', $properties );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertArrayHasKey( 'alt_text', $properties );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertArrayHasKey( 'caption', $properties );
</span></span></pre></div>
<a id="trunktestsphpunittestsrestapirestautosavescontrollerphp"></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-autosaves-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-autosaves-controller.php 2021-07-07 01:04:06 UTC (rev 51366)
+++ trunk/tests/phpunit/tests/rest-api/rest-autosaves-controller.php 2021-07-07 10:32:56 UTC (rev 51367)
</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"> $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( 13, count( $properties ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 13, $properties );
</ins><span class="cx" style="display: block; padding: 0 10px"> $this->assertArrayHasKey( 'author', $properties );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertArrayHasKey( 'content', $properties );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertArrayHasKey( 'date', $properties );
</span></span></pre></div>
<a id="trunktestsphpunittestsrestapirestblocktypecontrollerphp"></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-block-type-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-block-type-controller.php 2021-07-07 01:04:06 UTC (rev 51366)
+++ trunk/tests/phpunit/tests/rest-api/rest-block-type-controller.php 2021-07-07 10:32:56 UTC (rev 51367)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -341,7 +341,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"> $this->assertSame( $block_type, $data['name'] );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertArrayHasKey( 'variations', $data );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( 1, count( $data['variations'] ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 1, $data['variations'] );
</ins><span class="cx" style="display: block; padding: 0 10px"> $variation = $data['variations'][0];
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame( 'variation title', $variation['title'] );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame( 'variation description', $variation['description'] );
</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 2021-07-07 01:04:06 UTC (rev 51366)
+++ trunk/tests/phpunit/tests/rest-api/rest-categories-controller.php 2021-07-07 10:32:56 UTC (rev 51367)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -183,7 +183,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $request->set_param( 'hide_empty', true );
</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->assertSame( 2, count( $data ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 2, $data );
</ins><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame( 'Season 5', $data[0]['name'] );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame( 'The Be Sharps', $data[1]['name'] );
</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"> $request->set_param( 'hide_empty', 'false' );
</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->assertSame( $total_categories, count( $data ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( $total_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() {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -291,7 +291,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $request->set_param( 'include', array( $id2, $id1 ) );
</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->assertSame( 2, count( $data ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 2, $data );
</ins><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame( $id1, $data[0]['id'] );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // 'orderby' => 'include'.
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -298,7 +298,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $request->set_param( 'orderby', 'include' );
</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->assertSame( 2, count( $data ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 2, $data );
</ins><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame( $id2, $data[0]['id'] );
</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">@@ -339,7 +339,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"> $this->assertSame( 200, $response->get_status() );
</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->assertSame( 1, count( $data ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 1, $data );
</ins><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame( 'Uncategorized', $data[0]['name'] );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $request = new WP_REST_Request( 'GET', '/wp/v2/categories' );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -349,7 +349,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"> $this->assertSame( 200, $response->get_status() );
</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->assertSame( 2, count( $data ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 2, $data );
</ins><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame( 'Apple', $data[0]['name'] );
</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">@@ -439,7 +439,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">
</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->assertSame( 3, count( $data ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 3, $data );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Check ordered by name by default.
</span><span class="cx" style="display: block; padding: 0 10px"> $names = wp_list_pluck( $data, 'name' );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -457,7 +457,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">
</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->assertSame( 3, count( $data ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 3, $data );
</ins><span class="cx" style="display: block; padding: 0 10px"> $names = wp_list_pluck( $data, 'name' );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame( array( 'Image', 'Marvel', 'DC' ), $names, 'Terms should be ordered by description' );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -467,7 +467,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">
</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->assertSame( 3, count( $data ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 3, $data );
</ins><span class="cx" style="display: block; padding: 0 10px"> $names = wp_list_pluck( $data, 'name' );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame( array( 'DC', 'Marvel', 'Image' ), $names, 'Terms should be reverse-ordered by description' );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -482,7 +482,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">
</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->assertSame( 3, count( $data ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 3, $data );
</ins><span class="cx" style="display: block; padding: 0 10px"> $names = wp_list_pluck( $data, 'name' );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame( array( 'DC', 'Marvel', 'Image' ), $names );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -518,7 +518,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">
</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->assertSame( 2, count( $data ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 2, $data );
</ins><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame( 'Cape', $data[0]['name'] );
</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">@@ -535,7 +535,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"> $this->assertSame( 200, $response->get_status() );
</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->assertSame( 1, count( $data ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 1, $data );
</ins><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame( 'Apple', $data[0]['name'] );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $request = new WP_REST_Request( 'GET', '/wp/v2/categories' );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -543,7 +543,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"> $this->assertSame( 200, $response->get_status() );
</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->assertSame( 0, count( $data ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 0, $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_slug_arg() {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -555,7 +555,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"> $this->assertSame( 200, $response->get_status() );
</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->assertSame( 1, count( $data ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 1, $data );
</ins><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame( 'Apple', $data[0]['name'] );
</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">@@ -572,7 +572,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $request->set_param( 'parent', $category1 );
</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->assertSame( 1, count( $data ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 1, $data );
</ins><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame( 'Child', $data[0]['name'] );
</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">@@ -1130,7 +1130,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( 9, count( $properties ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 9, $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( 'count', $properties );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertArrayHasKey( 'description', $properties );
</span></span></pre></div>
<a id="trunktestsphpunittestsrestapirestcommentscontrollerphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/tests/rest-api/rest-comments-controller.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/rest-api/rest-comments-controller.php 2021-07-07 01:04:06 UTC (rev 51366)
+++ trunk/tests/phpunit/tests/rest-api/rest-comments-controller.php 2021-07-07 10:32:56 UTC (rev 51367)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -488,7 +488,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $request->set_param( 'include', array( $id2, $id1 ) );
</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->assertSame( 2, count( $data ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 2, $data );
</ins><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame( $id1, $data[0]['id'] );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // 'orderby' => 'include'.
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -495,7 +495,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $request->set_param( 'orderby', 'include' );
</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->assertSame( 2, count( $data ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 2, $data );
</ins><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame( $id2, $data[0]['id'] );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Invalid 'orderby' should error.
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -3156,7 +3156,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( 17, count( $properties ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 17, $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( 'author', $properties );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertArrayHasKey( 'author_avatar_urls', $properties );
</span></span></pre></div>
<a id="trunktestsphpunittestsrestapirestpagescontrollerphp"></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-pages-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-pages-controller.php 2021-07-07 01:04:06 UTC (rev 51366)
+++ trunk/tests/phpunit/tests/rest-api/rest-pages-controller.php 2021-07-07 10:32:56 UTC (rev 51367)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -109,7 +109,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $request = new WP_REST_Request( 'GET', '/wp/v2/pages' );
</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->assertSame( 1, count( $data ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 1, $data );
</ins><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame( $id1, $data[0]['id'] );
</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">@@ -132,13 +132,13 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $request = new WP_REST_Request( 'GET', '/wp/v2/pages' );
</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->assertSame( 2, count( $data ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 2, $data );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Filter to parent.
</span><span class="cx" style="display: block; padding: 0 10px"> $request->set_param( 'parent', $id1 );
</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->assertSame( 1, count( $data ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 1, $data );
</ins><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame( $id2, $data[0]['id'] );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Invalid 'parent' should error.
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -179,13 +179,13 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $request = new WP_REST_Request( 'GET', '/wp/v2/pages' );
</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->assertSame( 4, count( $data ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 4, $data );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Filter to parents.
</span><span class="cx" style="display: block; padding: 0 10px"> $request->set_param( 'parent', array( $id1, $id3 ) );
</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->assertSame( 2, count( $data ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 2, $data );
</ins><span class="cx" style="display: block; padding: 0 10px"> $this->assertSameSets( array( $id2, $id4 ), wp_list_pluck( $data, 'id' ) );
</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">@@ -208,13 +208,13 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $request = new WP_REST_Request( 'GET', '/wp/v2/pages' );
</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->assertSame( 2, count( $data ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 2, $data );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Filter to parent.
</span><span class="cx" style="display: block; padding: 0 10px"> $request->set_param( 'parent_exclude', $id1 );
</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->assertSame( 1, count( $data ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 1, $data );
</ins><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame( $id1, $data[0]['id'] );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Invalid 'parent_exclude' should error.
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -558,7 +558,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame( 2, $headers['X-WP-TotalPages'] );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $all_data = $response->get_data();
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( 4, count( $all_data ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 4, $all_data );
</ins><span class="cx" style="display: block; padding: 0 10px"> foreach ( $all_data as $post ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame( 'page', $post['type'] );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -737,7 +737,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( 24, count( $properties ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 24, $properties );
</ins><span class="cx" style="display: block; padding: 0 10px"> $this->assertArrayHasKey( 'author', $properties );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertArrayHasKey( 'comment_status', $properties );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertArrayHasKey( 'content', $properties );
</span></span></pre></div>
<a id="trunktestsphpunittestsrestapirestpoststatusescontrollerphp"></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-statuses-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-statuses-controller.php 2021-07-07 01:04:06 UTC (rev 51366)
+++ trunk/tests/phpunit/tests/rest-api/rest-post-statuses-controller.php 2021-07-07 10:32:56 UTC (rev 51367)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -38,7 +38,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"> $statuses = get_post_stati( array( 'public' => true ), 'objects' );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( 1, count( $data ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 1, $data );
</ins><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame( 'publish', $data['publish']['slug'] );
</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">@@ -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">
</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->assertSame( 6, count( $data ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 6, $data );
</ins><span class="cx" style="display: block; padding: 0 10px"> $this->assertSameSets(
</span><span class="cx" style="display: block; padding: 0 10px"> array(
</span><span class="cx" style="display: block; padding: 0 10px"> 'publish',
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -153,7 +153,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( 8, count( $properties ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 8, $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( 'private', $properties );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertArrayHasKey( 'protected', $properties );
</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 2021-07-07 01:04:06 UTC (rev 51366)
+++ trunk/tests/phpunit/tests/rest-api/rest-post-types-controller.php 2021-07-07 10:32:56 UTC (rev 51367)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -144,7 +144,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( 10, count( $properties ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 10, $properties );
</ins><span class="cx" style="display: block; padding: 0 10px"> $this->assertArrayHasKey( 'capabilities', $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( 'hierarchical', $properties );
</span></span></pre></div>
<a id="trunktestsphpunittestsrestapirestpostscontrollerphp"></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-posts-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-posts-controller.php 2021-07-07 01:04:06 UTC (rev 51366)
+++ trunk/tests/phpunit/tests/rest-api/rest-posts-controller.php 2021-07-07 10:32:56 UTC (rev 51367)
</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"> $request->set_param( 'per_page', self::$per_page );
</span><span class="cx" style="display: block; padding: 0 10px"> $response = rest_get_server()->dispatch( $request );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame( 200, $response->get_status() );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( $total_posts, count( $response->get_data() ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( $total_posts, $response->get_data() );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Limit to editor and author.
</span><span class="cx" style="display: block; padding: 0 10px"> $request = new WP_REST_Request( 'GET', '/wp/v2/posts' );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -276,7 +276,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"> $this->assertSame( 200, $response->get_status() );
</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->assertSame( 2, count( $data ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 2, $data );
</ins><span class="cx" style="display: block; padding: 0 10px"> $this->assertSameSets( array( self::$editor_id, self::$author_id ), wp_list_pluck( $data, 'author' ) );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Limit to editor.
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -285,7 +285,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"> $this->assertSame( 200, $response->get_status() );
</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->assertSame( 1, count( $data ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 1, $data );
</ins><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame( self::$editor_id, $data[0]['author'] );
</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">@@ -300,7 +300,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $request->set_param( 'per_page', self::$per_page );
</span><span class="cx" style="display: block; padding: 0 10px"> $response = rest_get_server()->dispatch( $request );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame( 200, $response->get_status() );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( $total_posts, count( $response->get_data() ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( $total_posts, $response->get_data() );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Exclude editor and author.
</span><span class="cx" style="display: block; padding: 0 10px"> $request = new WP_REST_Request( 'GET', '/wp/v2/posts' );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -309,7 +309,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"> $this->assertSame( 200, $response->get_status() );
</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->assertSame( $total_posts - 2, count( $data ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( $total_posts - 2, $data );
</ins><span class="cx" style="display: block; padding: 0 10px"> $this->assertNotEquals( self::$editor_id, $data[0]['author'] );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertNotEquals( self::$author_id, $data[0]['author'] );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -320,7 +320,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"> $this->assertSame( 200, $response->get_status() );
</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->assertSame( $total_posts - 1, count( $data ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( $total_posts - 1, $data );
</ins><span class="cx" style="display: block; padding: 0 10px"> $this->assertNotEquals( self::$editor_id, $data[0]['author'] );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertNotEquals( self::$editor_id, $data[1]['author'] );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -351,7 +351,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $request->set_param( 'include', array( $id1, $id2 ) );
</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->assertSame( 2, count( $data ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 2, $data );
</ins><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame( $id2, $data[0]['id'] );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertPostsOrderedBy( '{posts}.post_date DESC' );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -359,7 +359,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $request->set_param( 'orderby', 'include' );
</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->assertSame( 2, count( $data ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 2, $data );
</ins><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame( $id1, $data[0]['id'] );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertPostsOrderedBy( "FIELD({posts}.ID,$id1,$id2)" );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -509,13 +509,13 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $request = new WP_REST_Request( 'GET', '/wp/v2/posts' );
</span><span class="cx" style="display: block; padding: 0 10px"> $request->set_param( 'per_page', self::$per_page );
</span><span class="cx" style="display: block; padding: 0 10px"> $response = rest_get_server()->dispatch( $request );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( $total_posts, count( $response->get_data() ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( $total_posts, $response->get_data() );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $request = new WP_REST_Request( 'GET', '/wp/v2/posts' );
</span><span class="cx" style="display: block; padding: 0 10px"> $request->set_param( 'search', 'Search Result' );
</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->assertSame( 1, count( $data ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 1, $data );
</ins><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame( 'Search Result', $data[0]['title']['rendered'] );
</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">@@ -538,7 +538,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"> $this->assertSame( 200, $response->get_status() );
</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->assertSame( 1, count( $data ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 1, $data );
</ins><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame( 'Apple', $data[0]['title']['rendered'] );
</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">@@ -567,7 +567,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"> $this->assertSame( 200, $response->get_status() );
</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->assertSame( 2, count( $data ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 2, $data );
</ins><span class="cx" style="display: block; padding: 0 10px"> $titles = array(
</span><span class="cx" style="display: block; padding: 0 10px"> $data[0]['title']['rendered'],
</span><span class="cx" style="display: block; padding: 0 10px"> $data[1]['title']['rendered'],
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -601,7 +601,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"> $this->assertSame( 200, $response->get_status() );
</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->assertSame( 2, count( $data ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 2, $data );
</ins><span class="cx" style="display: block; padding: 0 10px"> $titles = array(
</span><span class="cx" style="display: block; padding: 0 10px"> $data[0]['title']['rendered'],
</span><span class="cx" style="display: block; padding: 0 10px"> $data[1]['title']['rendered'],
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -620,7 +620,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $request->set_param( 'status', 'publish' );
</span><span class="cx" style="display: block; padding: 0 10px"> $response = rest_get_server()->dispatch( $request );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame( 200, $response->get_status() );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( self::$total_posts, count( $response->get_data() ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( self::$total_posts, $response->get_data() );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $request = new WP_REST_Request( 'GET', '/wp/v2/posts' );
</span><span class="cx" style="display: block; padding: 0 10px"> $request->set_param( 'status', 'draft' );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -633,7 +633,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $request->set_param( 'status', 'draft' );
</span><span class="cx" style="display: block; padding: 0 10px"> $response = rest_get_server()->dispatch( $request );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame( 200, $response->get_status() );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( 1, count( $response->get_data() ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 1, $response->get_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_multiple_statuses_string_query() {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -650,7 +650,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"> $this->assertSame( 200, $response->get_status() );
</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->assertSame( 2, count( $data ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 2, $data );
</ins><span class="cx" style="display: block; padding: 0 10px"> $statuses = array(
</span><span class="cx" style="display: block; padding: 0 10px"> $data[0]['status'],
</span><span class="cx" style="display: block; padding: 0 10px"> $data[1]['status'],
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -673,7 +673,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"> $this->assertSame( 200, $response->get_status() );
</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->assertSame( 2, count( $data ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 2, $data );
</ins><span class="cx" style="display: block; padding: 0 10px"> $statuses = array(
</span><span class="cx" style="display: block; padding: 0 10px"> $data[0]['status'],
</span><span class="cx" style="display: block; padding: 0 10px"> $data[1]['status'],
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -4167,7 +4167,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( 26, count( $properties ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 26, $properties );
</ins><span class="cx" style="display: block; padding: 0 10px"> $this->assertArrayHasKey( 'author', $properties );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertArrayHasKey( 'comment_status', $properties );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertArrayHasKey( 'content', $properties );
</span></span></pre></div>
<a id="trunktestsphpunittestsrestapirestrevisionscontrollerphp"></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-revisions-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-revisions-controller.php 2021-07-07 01:04:06 UTC (rev 51366)
+++ trunk/tests/phpunit/tests/rest-api/rest-revisions-controller.php 2021-07-07 10:32:56 UTC (rev 51367)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -328,7 +328,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( 12, count( $properties ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 12, $properties );
</ins><span class="cx" style="display: block; padding: 0 10px"> $this->assertArrayHasKey( 'author', $properties );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertArrayHasKey( 'content', $properties );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertArrayHasKey( 'date', $properties );
</span></span></pre></div>
<a id="trunktestsphpunittestsrestapirestsearchcontrollerphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/tests/rest-api/rest-search-controller.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/rest-api/rest-search-controller.php 2021-07-07 01:04:06 UTC (rev 51366)
+++ trunk/tests/phpunit/tests/rest-api/rest-search-controller.php 2021-07-07 10:32:56 UTC (rev 51367)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -175,7 +175,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"> $this->assertSame( 200, $response->get_status() );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( 3, count( $response->get_data() ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 3, $response->get_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="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 2021-07-07 01:04:06 UTC (rev 51366)
+++ trunk/tests/phpunit/tests/rest-api/rest-tags-controller.php 2021-07-07 10:32:56 UTC (rev 51367)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -200,7 +200,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $request->set_param( 'hide_empty', true );
</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->assertSame( 2, count( $data ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 2, $data );
</ins><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame( 'Season 5', $data[0]['name'] );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame( 'The Be Sharps', $data[1]['name'] );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -220,7 +220,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $request->set_param( 'include', array( $id2, $id1 ) );
</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->assertSame( 2, count( $data ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 2, $data );
</ins><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame( $id1, $data[0]['id'] );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // 'orderby' => 'include'.
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -227,7 +227,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $request->set_param( 'orderby', 'include' );
</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->assertSame( 2, count( $data ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 2, $data );
</ins><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame( $id2, $data[0]['id'] );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Invalid 'include' should error.
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -302,7 +302,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"> $this->assertSame( 200, $response->get_status() );
</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->assertSame( 1, count( $data ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 1, $data );
</ins><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame( 'Zucchini', $data[0]['name'] );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $request = new WP_REST_Request( 'GET', '/wp/v2/tags' );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -312,7 +312,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"> $this->assertSame( 200, $response->get_status() );
</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->assertSame( 2, count( $data ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 2, $data );
</ins><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame( 'Apple', $data[0]['name'] );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Invalid 'orderby' should error.
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -387,7 +387,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">
</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->assertSame( 2, count( $data ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 2, $data );
</ins><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame( 'DC', $data[0]['name'] );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Invalid 'post' should error.
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -474,7 +474,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">
</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->assertSame( 2, count( $data ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 2, $data );
</ins><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame( 'Cape', $data[0]['name'] );
</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">@@ -491,7 +491,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"> $this->assertSame( 200, $response->get_status() );
</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->assertSame( 1, count( $data ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 1, $data );
</ins><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame( 'Apple', $data[0]['name'] );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $request = new WP_REST_Request( 'GET', '/wp/v2/tags' );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -499,7 +499,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"> $this->assertSame( 200, $response->get_status() );
</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->assertSame( 0, count( $data ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 0, $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_slug_arg() {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -511,7 +511,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"> $this->assertSame( 200, $response->get_status() );
</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->assertSame( 1, count( $data ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 1, $data );
</ins><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame( 'Apple', $data[0]['name'] );
</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">@@ -1224,7 +1224,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( 8, count( $properties ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 8, $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( 'count', $properties );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertArrayHasKey( 'description', $properties );
</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 2021-07-07 01:04:06 UTC (rev 51366)
+++ trunk/tests/phpunit/tests/rest-api/rest-taxonomies-controller.php 2021-07-07 10:32:56 UTC (rev 51367)
</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"> $this->assertSame( 'post', $types[0] );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertArrayHasKey( 1, $types );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame( 'attachment', $types[1] );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( 2, count( $types ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 2, $types );
</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_item_schema() {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -219,7 +219,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( 10, count( $properties ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 10, $properties );
</ins><span class="cx" style="display: block; padding: 0 10px"> $this->assertArrayHasKey( 'capabilities', $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( 'hierarchical', $properties );
</span></span></pre></div>
<a id="trunktestsphpunittestsrestapirestthemescontrollerphp"></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-themes-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-themes-controller.php 2021-07-07 01:04:06 UTC (rev 51366)
+++ trunk/tests/phpunit/tests/rest-api/rest-themes-controller.php 2021-07-07 10:32:56 UTC (rev 51367)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -342,7 +342,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $response = self::perform_active_theme_request( 'OPTIONS' );
</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( 15, count( $properties ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 15, $properties );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertArrayHasKey( 'author', $properties );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertArrayHasKey( 'raw', $properties['author']['properties'] );
</span></span></pre></div>
<a id="trunktestsphpunittestsrestapirestuserscontrollerphp"></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-users-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-users-controller.php 2021-07-07 01:04:06 UTC (rev 51366)
+++ trunk/tests/phpunit/tests/rest-api/rest-users-controller.php 2021-07-07 10:32:56 UTC (rev 51367)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -387,12 +387,12 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $request = new WP_REST_Request( 'GET', '/wp/v2/users' );
</span><span class="cx" style="display: block; padding: 0 10px"> $response = rest_get_server()->dispatch( $request );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( 10, count( $response->get_data() ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 10, $response->get_data() );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $request = new WP_REST_Request( 'GET', '/wp/v2/users' );
</span><span class="cx" style="display: block; padding: 0 10px"> $request->set_param( 'per_page', 5 );
</span><span class="cx" style="display: block; padding: 0 10px"> $response = rest_get_server()->dispatch( $request );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( 5, count( $response->get_data() ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 5, $response->get_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_page() {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -402,7 +402,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $request->set_param( 'per_page', 5 );
</span><span class="cx" style="display: block; padding: 0 10px"> $request->set_param( 'page', 2 );
</span><span class="cx" style="display: block; padding: 0 10px"> $response = rest_get_server()->dispatch( $request );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( 5, count( $response->get_data() ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 5, $response->get_data() );
</ins><span class="cx" style="display: block; padding: 0 10px"> $prev_link = add_query_arg(
</span><span class="cx" style="display: block; padding: 0 10px"> array(
</span><span class="cx" style="display: block; padding: 0 10px"> 'per_page' => 5,
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -598,7 +598,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $request->set_param( 'include', array( $id2, $id1 ) );
</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->assertSame( 2, count( $data ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 2, $data );
</ins><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame( $id1, $data[0]['id'] );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // 'orderby' => 'include'.
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -605,7 +605,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $request->set_param( 'orderby', 'include' );
</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->assertSame( 2, count( $data ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 2, $data );
</ins><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame( $id2, $data[0]['id'] );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Invalid 'include' should error.
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -618,7 +618,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> wp_set_current_user( 0 );
</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->assertSame( 0, count( $data ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 0, $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">@@ -655,7 +655,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $request = new WP_REST_Request( 'GET', '/wp/v2/users' );
</span><span class="cx" style="display: block; padding: 0 10px"> $request->set_param( 'search', 'yololololo' );
</span><span class="cx" style="display: block; padding: 0 10px"> $response = rest_get_server()->dispatch( $request );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( 0, count( $response->get_data() ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 0, $response->get_data() );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $yolo_id = $this->factory->user->create( array( 'display_name' => 'yololololo' ) );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -662,7 +662,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $request = new WP_REST_Request( 'GET', '/wp/v2/users' );
</span><span class="cx" style="display: block; padding: 0 10px"> $request->set_param( 'search', 'yololololo' );
</span><span class="cx" style="display: block; padding: 0 10px"> $response = rest_get_server()->dispatch( $request );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( 1, count( $response->get_data() ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 1, $response->get_data() );
</ins><span class="cx" style="display: block; padding: 0 10px"> // Default to wildcard search.
</span><span class="cx" style="display: block; padding: 0 10px"> $adam_id = $this->factory->user->create(
</span><span class="cx" style="display: block; padding: 0 10px"> array(
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -675,7 +675,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $request->set_param( 'search', 'ada' );
</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->assertSame( 1, count( $data ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 1, $data );
</ins><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame( $adam_id, $data[0]['id'] );
</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">@@ -699,7 +699,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $request->set_param( 'slug', 'foo' );
</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->assertSame( 1, count( $data ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 1, $data );
</ins><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame( $id2, $data[0]['id'] );
</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">@@ -812,7 +812,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $request->set_param( 'roles', 'author,subscriber' );
</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->assertSame( 3, count( $data ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 3, $data );
</ins><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame( $tango, $data[1]['id'] );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame( $yolo, $data[2]['id'] );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -819,7 +819,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $request->set_param( 'roles', 'author' );
</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->assertSame( 1, count( $data ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 1, $data );
</ins><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame( $yolo, $data[0]['id'] );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> wp_set_current_user( 0 );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -849,7 +849,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $request->set_param( 'roles', 'ilovesteak,author' );
</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->assertSame( 1, count( $data ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 1, $data );
</ins><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame( $lolz, $data[0]['id'] );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $request = new WP_REST_Request( 'GET', '/wp/v2/users' );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -856,7 +856,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $request->set_param( 'roles', 'steakisgood' );
</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->assertSame( 0, count( $data ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 0, $data );
</ins><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame( array(), $data );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2620,7 +2620,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->assertSame( 19, count( $properties ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 19, $properties );
</ins><span class="cx" style="display: block; padding: 0 10px"> $this->assertArrayHasKey( 'avatar_urls', $properties );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertArrayHasKey( 'capabilities', $properties );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertArrayHasKey( 'description', $properties );
</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-07-07 01:04:06 UTC (rev 51366)
+++ trunk/tests/phpunit/tests/rest-api/rest-widgets-controller.php 2021-07-07 10:32:56 UTC (rev 51367)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1450,7 +1450,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->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( 'id_base', $properties );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertArrayHasKey( 'sidebar', $properties );
</span></span></pre></div>
<a id="trunktestsphpunitteststaxonomyphp"></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/taxonomy.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/taxonomy.php 2021-07-07 01:04:06 UTC (rev 51366)
+++ trunk/tests/phpunit/tests/taxonomy.php 2021-07-07 10:32:56 UTC (rev 51367)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -862,7 +862,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertTrue( unregister_taxonomy( 'foo' ) );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertNotContains( '%foo%', $wp_rewrite->rewritecode );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertNotContains( 'bar=', $wp_rewrite->queryreplace );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( --$count_before, count( $wp_rewrite->rewritereplace ) ); // Array was reduced by one value.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( --$count_before, $wp_rewrite->rewritereplace ); // Array was reduced by one 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">@@ -891,7 +891,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> register_taxonomy( 'foo', 'post' );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertArrayHasKey( 'wp_ajax_add-foo', $wp_filter );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( 1, count( $wp_filter['wp_ajax_add-foo']->callbacks ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 1, $wp_filter['wp_ajax_add-foo']->callbacks );
</ins><span class="cx" style="display: block; padding: 0 10px"> $this->assertTrue( unregister_taxonomy( 'foo' ) );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertArrayNotHasKey( 'wp_ajax_add-foo', $wp_filter );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span></span></pre></div>
<a id="trunktestsphpunitteststermcachephp"></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/cache.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/term/cache.php 2021-07-07 01:04:06 UTC (rev 51366)
+++ trunk/tests/phpunit/tests/term/cache.php 2021-07-07 10:32:56 UTC (rev 51367)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -83,7 +83,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"> $terms = get_terms( $tax, array( 'hide_empty' => false ) );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( $i, count( $terms ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( $i, $terms );
</ins><span class="cx" style="display: block; padding: 0 10px"> if ( $i > 1 ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $hierarchy = _get_term_hierarchy( $tax );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertNotEmpty( $hierarchy );
</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 2021-07-07 01:04:06 UTC (rev 51366)
+++ trunk/tests/phpunit/tests/term/getTerms.php 2021-07-07 10:32:56 UTC (rev 51367)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -115,7 +115,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // last_changed and num_queries should bump.
</span><span class="cx" style="display: block; padding: 0 10px"> $terms = get_terms( 'post_tag', array( 'update_term_meta_cache' => false ) );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( 3, count( $terms ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 3, $terms );
</ins><span class="cx" style="display: block; padding: 0 10px"> $time1 = wp_cache_get( 'last_changed', 'terms' );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertNotEmpty( $time1 );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame( $num_queries + 1, $wpdb->num_queries );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -124,7 +124,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Again. last_changed and num_queries should remain the same.
</span><span class="cx" style="display: block; padding: 0 10px"> $terms = get_terms( 'post_tag', array( 'update_term_meta_cache' => false ) );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( 3, count( $terms ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 3, $terms );
</ins><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame( $time1, wp_cache_get( 'last_changed', 'terms' ) );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame( $num_queries, $wpdb->num_queries );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -144,7 +144,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // num_queries should bump, last_changed should remain the same.
</span><span class="cx" style="display: block; padding: 0 10px"> $terms = get_terms( 'post_tag', array( 'number' => 2 ) );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( 2, count( $terms ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 2, $terms );
</ins><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame( $time1, wp_cache_get( 'last_changed', 'terms' ) );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame( $num_queries + 1, $wpdb->num_queries );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -152,7 +152,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Again. last_changed and num_queries should remain the same.
</span><span class="cx" style="display: block; padding: 0 10px"> $terms = get_terms( 'post_tag', array( 'number' => 2 ) );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( 2, count( $terms ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 2, $terms );
</ins><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame( $time1, wp_cache_get( 'last_changed', 'terms' ) );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame( $num_queries, $wpdb->num_queries );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -179,7 +179,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // last_changed and num_queries should bump after a term is deleted.
</span><span class="cx" style="display: block; padding: 0 10px"> $terms = get_terms( 'post_tag' );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( 2, count( $terms ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 2, $terms );
</ins><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame( $time2, wp_cache_get( 'last_changed', 'terms' ) );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame( $num_queries + 1, $wpdb->num_queries );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -187,7 +187,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Again. last_changed and num_queries should remain the same.
</span><span class="cx" style="display: block; padding: 0 10px"> $terms = get_terms( 'post_tag' );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( 2, count( $terms ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 2, $terms );
</ins><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame( $time2, wp_cache_get( 'last_changed', 'terms' ) );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame( $num_queries, $wpdb->num_queries );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -617,7 +617,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 'cache_domain' => $tax,
</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( 2, count( $terms ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 2, $terms );
</ins><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame( wp_list_pluck( $terms, 'name' ), array( 'Cheese', 'Crackers' ) );
</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">@@ -660,7 +660,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 'cache_domain' => $tax,
</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( 1, count( $terms ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 1, $terms );
</ins><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame( array( 'Cheese' ), wp_list_pluck( $terms, 'name' ) );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> _unregister_taxonomy( $tax );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -696,7 +696,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 'cache_domain' => $tax,
</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( 1, count( $terms ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 1, $terms );
</ins><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame( array( 'term1' ), wp_list_pluck( $terms, 'name' ) );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> _unregister_taxonomy( $tax );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -716,7 +716,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"> );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( 1, count( $terms ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 1, $terms );
</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">@@ -2308,7 +2308,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"> // Verify that there are no children.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( 0, count( $terms ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 0, $terms );
</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">@@ -2374,7 +2374,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"> // Verify that there are no children.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( 0, count( $terms ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 0, $terms );
</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_hierarchical_true_with_child_of_should_return_grandchildren() {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2487,7 +2487,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"> // 'hierarchical=false' means that descendants are not fetched.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( 0, count( $terms ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 0, $terms );
</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="trunktestsphpunitteststermgetTheTermsphp"></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/getTheTerms.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/term/getTheTerms.php 2021-07-07 01:04:06 UTC (rev 51366)
+++ trunk/tests/phpunit/tests/term/getTheTerms.php 2021-07-07 10:32:56 UTC (rev 51367)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -22,7 +22,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Cache should be empty after a set.
</span><span class="cx" style="display: block; padding: 0 10px"> $tt_1 = wp_set_object_terms( $post_id, $terms_1, $this->taxonomy );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( 3, count( $tt_1 ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 3, $tt_1 );
</ins><span class="cx" style="display: block; padding: 0 10px"> $this->assertFalse( wp_cache_get( $post_id, $this->taxonomy . '_relationships' ) );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // wp_get_object_terms() does not prime the cache.
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -43,7 +43,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Cache should be empty after a set.
</span><span class="cx" style="display: block; padding: 0 10px"> $tt_2 = wp_set_object_terms( $post_id, $terms_2, $this->taxonomy );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( 2, count( $tt_2 ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 2, $tt_2 );
</ins><span class="cx" style="display: block; padding: 0 10px"> $this->assertFalse( wp_cache_get( $post_id, $this->taxonomy . '_relationships' ) );
</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="trunktestsphpunitteststermmetaphp"></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/meta.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/term/meta.php 2021-07-07 01:04:06 UTC (rev 51366)
+++ trunk/tests/phpunit/tests/term/meta.php 2021-07-07 10:32:56 UTC (rev 51367)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -455,7 +455,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $term_meta_id = add_term_meta( $t, 'foo', 'bar' );
</span><span class="cx" style="display: block; padding: 0 10px"> $meta = has_term_meta( $t );
</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( 1, count( $meta ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 1, $meta );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $expected = array(
</span><span class="cx" style="display: block; padding: 0 10px"> 'meta_key' => 'foo',
</span></span></pre></div>
<a id="trunktestsphpunitteststermqueryphp"></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/query.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/term/query.php 2021-07-07 01:04:06 UTC (rev 51366)
+++ trunk/tests/phpunit/tests/term/query.php 2021-07-07 10:32:56 UTC (rev 51367)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -288,7 +288,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->assertSame( 1, count( $query->terms ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 1, $query->terms );
</ins><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame( $t, reset( $query->terms )->term_id );
</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">@@ -312,7 +312,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->assertSame( 2, count( $query->terms ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 2, $query->terms );
</ins><span class="cx" style="display: block; padding: 0 10px"> foreach ( $query->terms as $term ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame( $t, $term->term_id );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span></span></pre></div>
<a id="trunktestsphpunitteststermtaxQueryphp"></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/taxQuery.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/term/taxQuery.php 2021-07-07 01:04:06 UTC (rev 51366)
+++ trunk/tests/phpunit/tests/term/taxQuery.php 2021-07-07 10:32:56 UTC (rev 51367)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -111,7 +111,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->assertSame( 1, count( $q->queries ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 1, $q->queries );
</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_transform_query_terms_empty() {
</span></span></pre></div>
<a id="trunktestsphpunitteststermwpGetObjectTermsphp"></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/wpGetObjectTerms.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/term/wpGetObjectTerms.php 2021-07-07 01:04:06 UTC (rev 51366)
+++ trunk/tests/phpunit/tests/term/wpGetObjectTerms.php 2021-07-07 10:32:56 UTC (rev 51367)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -20,7 +20,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Set the initial terms.
</span><span class="cx" style="display: block; padding: 0 10px"> $tt_1 = wp_set_object_terms( $post_id, $terms_1, $this->taxonomy );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( 3, count( $tt_1 ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 3, $tt_1 );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Make sure they're correct.
</span><span class="cx" style="display: block; padding: 0 10px"> $terms = wp_get_object_terms(
</span></span></pre></div>
<a id="trunktestsphpunitteststermwpSetObjectTermsphp"></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/wpSetObjectTerms.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/term/wpSetObjectTerms.php 2021-07-07 01:04:06 UTC (rev 51366)
+++ trunk/tests/phpunit/tests/term/wpSetObjectTerms.php 2021-07-07 10:32:56 UTC (rev 51367)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -113,7 +113,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> foreach ( $ids as $id ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $tt = wp_set_object_terms( $id, array_values( $term_id ), $this->taxonomy );
</span><span class="cx" style="display: block; padding: 0 10px"> // Should return three term taxonomy IDs.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( 3, count( $tt ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 3, $tt );
</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"> // Each term should be associated with every post.
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -141,7 +141,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> foreach ( $ids as $id ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $tt = wp_set_object_terms( $id, $terms, $this->taxonomy );
</span><span class="cx" style="display: block; padding: 0 10px"> // Should return three term taxonomy IDs.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( 3, count( $tt ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 3, $tt );
</ins><span class="cx" style="display: block; padding: 0 10px"> // Remember which term has which term_id.
</span><span class="cx" style="display: block; padding: 0 10px"> for ( $i = 0; $i < 3; $i++ ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $term = get_term_by( 'name', $terms[ $i ], $this->taxonomy );
</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"> // Set the initial terms.
</span><span class="cx" style="display: block; padding: 0 10px"> $tt_1 = wp_set_object_terms( $post_id, $terms_1, $this->taxonomy );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( 3, count( $tt_1 ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 3, $tt_1 );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Make sure they're correct.
</span><span class="cx" style="display: block; padding: 0 10px"> $terms = wp_get_object_terms(
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -283,7 +283,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Change the terms.
</span><span class="cx" style="display: block; padding: 0 10px"> $tt_2 = wp_set_object_terms( $post_id, $terms_2, $this->taxonomy );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( 2, count( $tt_2 ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 2, $tt_2 );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Make sure they're correct.
</span><span class="cx" style="display: block; padding: 0 10px"> $terms = wp_get_object_terms(
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -312,7 +312,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Set the initial terms.
</span><span class="cx" style="display: block; padding: 0 10px"> $tt_1 = wp_set_object_terms( $post_id, $terms_1, $this->taxonomy );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( 3, count( $tt_1 ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 3, $tt_1 );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Make sure they're correct.
</span><span class="cx" style="display: block; padding: 0 10px"> $terms = wp_get_object_terms(
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -327,7 +327,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Change the terms.
</span><span class="cx" style="display: block; padding: 0 10px"> $tt_2 = wp_set_object_terms( $post_id, $terms_2, $this->taxonomy );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( 2, count( $tt_2 ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 2, $tt_2 );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Make sure they're correct.
</span><span class="cx" style="display: block; padding: 0 10px"> $terms = wp_get_object_terms(
</span></span></pre></div>
<a id="trunktestsphpunitteststermphp"></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.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/term.php 2021-07-07 01:04:06 UTC (rev 51366)
+++ trunk/tests/phpunit/tests/term.php 2021-07-07 10:32:56 UTC (rev 51367)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -101,12 +101,12 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $tags = self::factory()->tag->create_many( 5 );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $tt = wp_add_object_terms( $posts[0], $tags[1], 'post_tag' );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( 1, count( $tt ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 1, $tt );
</ins><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame( array( $tags[1] ), wp_get_object_terms( $posts[0], 'post_tag', array( 'fields' => 'ids' ) ) );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $three_tags = array( $tags[0], $tags[1], $tags[2] );
</span><span class="cx" style="display: block; padding: 0 10px"> $tt = wp_add_object_terms( $posts[1], $three_tags, 'post_tag' );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( 3, count( $tt ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 3, $tt );
</ins><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame( $three_tags, wp_get_object_terms( $posts[1], 'post_tag', array( 'fields' => 'ids' ) ) );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertTrue( wp_remove_object_terms( $posts[0], $tags[1], 'post_tag' ) );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -113,7 +113,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertFalse( wp_remove_object_terms( $posts[0], $tags[0], 'post_tag' ) );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertInstanceOf( 'WP_Error', wp_remove_object_terms( $posts[0], $tags[1], 'non_existing_taxonomy' ) );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertTrue( wp_remove_object_terms( $posts[1], $three_tags, 'post_tag' ) );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( 0, count( wp_get_object_terms( $posts[1], 'post_tag' ) ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 0, wp_get_object_terms( $posts[1], 'post_tag' ) );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> foreach ( $tags as $term_id ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertTrue( wp_delete_term( $term_id, 'post_tag' ) );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -177,7 +177,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $post = get_post( $post_id );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertIsArray( $post->post_category );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( 1, count( $post->post_category ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 1, $post->post_category );
</ins><span class="cx" style="display: block; padding: 0 10px"> $this->assertEquals( get_option( 'default_category' ), $post->post_category[0] );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $term1 = wp_insert_term( 'Foo', 'category' );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -185,7 +185,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $term3 = wp_insert_term( 'Baz', 'category' );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> wp_set_post_categories( $post_id, array( $term1['term_id'], $term2['term_id'] ) );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( 2, count( $post->post_category ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 2, $post->post_category );
</ins><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame( array( $term2['term_id'], $term1['term_id'] ), $post->post_category );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> wp_set_post_categories( $post_id, $term3['term_id'], true );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -200,11 +200,11 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame( array( $term2['term_id'], $term4['term_id'], $term1['term_id'] ), $post->post_category );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> wp_set_post_categories( $post_id, array(), true );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( 1, count( $post->post_category ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 1, $post->post_category );
</ins><span class="cx" style="display: block; padding: 0 10px"> $this->assertEquals( get_option( 'default_category' ), $post->post_category[0] );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> wp_set_post_categories( $post_id, array() );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( 1, count( $post->post_category ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 1, $post->post_category );
</ins><span class="cx" style="display: block; padding: 0 10px"> $this->assertEquals( get_option( 'default_category' ), $post->post_category[0] );
</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="trunktestsphpunitteststhemewpThemeGetAllowedFiltersphp"></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/wpThemeGetAllowedFilters.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/theme/wpThemeGetAllowedFilters.php 2021-07-07 01:04:06 UTC (rev 51366)
+++ trunk/tests/phpunit/tests/theme/wpThemeGetAllowedFilters.php 2021-07-07 10:32:56 UTC (rev 51367)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -21,7 +21,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> WP_Theme::get_allowed( $blog_id );
</span><span class="cx" style="display: block; padding: 0 10px"> remove_filter( 'network_allowed_themes', array( $this, 'filter_network_allowed_themes' ) );
</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( 2, count( $this->filter_network_allowed_themes_args ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 2, $this->filter_network_allowed_themes_args );
</ins><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame( $blog_id, $this->filter_network_allowed_themes_args[1] );
</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="trunktestsphpunittestsuserqueryphp"></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/query.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/user/query.php 2021-07-07 01:04:06 UTC (rev 51366)
+++ trunk/tests/phpunit/tests/user/query.php 2021-07-07 10:32:56 UTC (rev 51367)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -137,7 +137,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $users = $users->get_results();
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // +1 for the default user created during installation.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( 13, count( $users ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 13, $users );
</ins><span class="cx" style="display: block; padding: 0 10px"> foreach ( $users as $user ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertInstanceOf( 'WP_User', $user );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -149,7 +149,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"> $users = $users->get_results();
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( 13, count( $users ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 13, $users );
</ins><span class="cx" style="display: block; padding: 0 10px"> foreach ( $users as $user ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertInstanceOf( 'WP_User', $user );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -502,7 +502,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> // +1 for the default user created by the test suite.
</span><span class="cx" style="display: block; padding: 0 10px"> $users = new WP_User_Query( array( 'blog_id' => get_current_blog_id() ) );
</span><span class="cx" style="display: block; padding: 0 10px"> $users = $users->get_results();
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( 13, count( $users ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 13, $users );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $users = new WP_User_Query(
</span><span class="cx" style="display: block; padding: 0 10px"> array(
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -511,7 +511,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"> $users = $users->get_results();
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( 10, count( $users ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 10, $users );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $users = new WP_User_Query(
</span><span class="cx" style="display: block; padding: 0 10px"> array(
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -520,7 +520,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"> $users = $users->get_results();
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( 2, count( $users ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 2, $users );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $users = new WP_User_Query(
</span><span class="cx" style="display: block; padding: 0 10px"> array(
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -529,7 +529,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"> $users = $users->get_results();
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( 13, count( $users ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 13, $users );
</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">@@ -1314,7 +1314,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $wp_user_search = new WP_User_Query( array( 'role' => 'subscriber' ) );
</span><span class="cx" style="display: block; padding: 0 10px"> $users = $wp_user_search->get_results();
</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( 2, count( $users ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 2, $users );
</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">@@ -1323,7 +1323,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> public function test_get_multiple_roles_by_user_query() {
</span><span class="cx" style="display: block; padding: 0 10px"> $wp_user_search = new WP_User_Query( array( 'role__in' => array( 'subscriber', 'editor' ) ) );
</span><span class="cx" style="display: block; padding: 0 10px"> $users = $wp_user_search->get_results();
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( 5, count( $users ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 5, $users );
</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">@@ -1336,7 +1336,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->assertSame( 2, count( $users ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 2, $users );
</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">@@ -1372,7 +1372,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->assertSame( 2, count( $users ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 2, $users );
</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">@@ -1392,7 +1392,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $users = new WP_User_Query( array( 'role' => array( 'subscriber', 'editor' ) ) );
</span><span class="cx" style="display: block; padding: 0 10px"> $users = $users->get_results();
</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( 2, count( $users ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 2, $users );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> foreach ( $users as $user ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertInstanceOf( 'WP_User', $user );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1407,7 +1407,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $users = $users->get_results();
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // +1 for the default user created during installation.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( 8, count( $users ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 8, $users );
</ins><span class="cx" style="display: block; padding: 0 10px"> foreach ( $users as $user ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertInstanceOf( 'WP_User', $user );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1436,7 +1436,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->assertSame( 2, count( $users ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 2, $users );
</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">@@ -1482,7 +1482,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"> // Check results.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( 1, count( $users ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 1, $users );
</ins><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame( self::$editor_ids[0], (int) $users[0]->ID );
</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">@@ -1497,7 +1497,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"> // +1 for the default user created during installation.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( 11, count( $users ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 11, $users );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $users = get_users(
</span><span class="cx" style="display: block; padding: 0 10px"> array(
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1506,7 +1506,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"> // +1 for the default user created during installation.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( 10, count( $users ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 10, $users );
</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">@@ -1524,7 +1524,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->assertSame( 5, count( $users ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 5, $users );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $users = get_users(
</span><span class="cx" style="display: block; padding: 0 10px"> array(
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1533,7 +1533,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->assertSame( 3, count( $users ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 3, $users );
</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">@@ -1550,7 +1550,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->assertSame( 1, count( $users ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 1, $users );
</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">@@ -1568,7 +1568,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"> // +1 for the default user created during installation.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( 12, count( $users ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 12, $users );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $users = get_users(
</span><span class="cx" style="display: block; padding: 0 10px"> array(
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1577,7 +1577,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"> // +1 for the default user created during installation.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( 10, count( $users ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 10, $users );
</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 2021-07-07 01:04:06 UTC (rev 51366)
+++ trunk/tests/phpunit/tests/user.php 2021-07-07 10:32:56 UTC (rev 51367)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -767,7 +767,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $response = wpmu_validate_user_signup( $user_data['user_login'], $user_data['user_email'] );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertInstanceOf( 'WP_Error', $response['errors'] );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( 0, count( $response['errors']->get_error_codes() ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 0, $response['errors']->get_error_codes() );
</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"> function _illegal_user_logins_data() {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1728,10 +1728,10 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertTrue( $actual['done'] );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Number of exported users.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( 1, count( $actual['data'] ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 1, $actual['data'] );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Number of exported user properties.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( 11, count( $actual['data'][0]['data'] ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 11, $actual['data'][0]['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">@@ -1862,11 +1862,11 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertTrue( $actual['done'] );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Number of exported users.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( 1, count( $actual['data'] ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 1, $actual['data'] );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Number of exported user properties (the 11 core properties,
</span><span class="cx" style="display: block; padding: 0 10px"> // plus 1 additional from the filter).
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( 12, count( $actual['data'][0]['data'] ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 12, $actual['data'][0]['data'] );
</ins><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><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame(
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1894,11 +1894,11 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertTrue( $actual['done'] );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Number of exported users.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( 1, count( $actual['data'] ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 1, $actual['data'] );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Number of exported user properties
</span><span class="cx" style="display: block; padding: 0 10px"> // (the 11 core properties, plus 1 additional from the filter).
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( 12, count( $actual['data'][0]['data'] ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 12, $actual['data'][0]['data'] );
</ins><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><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame(
</span></span></pre></div>
<a id="trunktestsphpunittestswidgetsphp"></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.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/widgets.php 2021-07-07 01:04:06 UTC (rev 51366)
+++ trunk/tests/phpunit/tests/widgets.php 2021-07-07 10:32:56 UTC (rev 51367)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -156,7 +156,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->assertSame( $num, count( $result ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( $num, $result );
</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="trunktestsphpunittestswpphp"></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/wp.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/wp.php 2021-07-07 01:04:06 UTC (rev 51366)
+++ trunk/tests/phpunit/tests/wp.php 2021-07-07 10:32:56 UTC (rev 51367)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -21,7 +21,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $this->wp->add_query_var( 'test2' );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->wp->add_query_var( 'test' );
</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( $public_qv_count + 2, count( $this->wp->public_query_vars ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( $public_qv_count + 2, $this->wp->public_query_vars );
</ins><span class="cx" style="display: block; padding: 0 10px"> $this->assertTrue( in_array( 'test', $this->wp->public_query_vars, true ) );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertTrue( in_array( 'test2', $this->wp->public_query_vars, true ) );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -33,6 +33,6 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertTrue( in_array( 'test', $this->wp->public_query_vars, true ) );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->wp->remove_query_var( 'test' );
</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( $public_qv_count, count( $this->wp->public_query_vars ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( $public_qv_count, $this->wp->public_query_vars );
</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="trunktestsphpunittestsxmlrpcmtgetRecentPostTitlesphp"></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/xmlrpc/mt/getRecentPostTitles.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/xmlrpc/mt/getRecentPostTitles.php 2021-07-07 01:04:06 UTC (rev 51366)
+++ trunk/tests/phpunit/tests/xmlrpc/mt/getRecentPostTitles.php 2021-07-07 10:32:56 UTC (rev 51367)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -26,7 +26,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $result = $this->myxmlrpcserver->mt_getRecentPostTitles( array( 1, 'author', 'author' ) );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertNotIXRError( $result );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( 0, count( $result ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 0, $result );
</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"> function test_date() {
</span></span></pre></div>
<a id="trunktestsphpunittestsxmlrpcmwgetRecentPostsphp"></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/xmlrpc/mw/getRecentPosts.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/xmlrpc/mw/getRecentPosts.php 2021-07-07 01:04:06 UTC (rev 51366)
+++ trunk/tests/phpunit/tests/xmlrpc/mw/getRecentPosts.php 2021-07-07 10:32:56 UTC (rev 51367)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -44,7 +44,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $result = $this->myxmlrpcserver->mw_getRecentPosts( array( 1, 'author', 'author' ) );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertNotIXRError( $result );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( 0, count( $result ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 0, $result );
</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"> function test_valid_post() {
</span></span></pre></div>
<a id="trunktestsphpunittestsxmlrpcwpeditPostphp"></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/xmlrpc/wp/editPost.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/xmlrpc/wp/editPost.php 2021-07-07 01:04:06 UTC (rev 51366)
+++ trunk/tests/phpunit/tests/xmlrpc/wp/editPost.php 2021-07-07 10:32:56 UTC (rev 51367)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -442,7 +442,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $this->myxmlrpcserver->add_enclosure_if_new( $post_id, $enclosure );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Verify that there is only a single value in the array and that a duplicate is not present.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( 1, count( get_post_meta( $post_id, 'enclosure' ) ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 1, get_post_meta( $post_id, 'enclosure' ) );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // For good measure, check that the expected value is in the array.
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertTrue( in_array( $enclosure_string, get_post_meta( $post_id, 'enclosure' ), true ) );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -451,7 +451,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $this->myxmlrpcserver->add_enclosure_if_new( $post_id, $new_enclosure );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Having added the new enclosure, 2 values are expected in the array.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( 2, count( get_post_meta( $post_id, 'enclosure' ) ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 2, get_post_meta( $post_id, 'enclosure' ) );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Check that the new enclosure is in the enclosure meta.
</span><span class="cx" style="display: block; padding: 0 10px"> $new_enclosure_string = "{$new_enclosure['url']}\n{$new_enclosure['length']}\n{$new_enclosure['type']}\n";
</span></span></pre></div>
<a id="trunktestsphpunittestsxmlrpcwpgetPostphp"></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/xmlrpc/wp/getPost.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/xmlrpc/wp/getPost.php 2021-07-07 01:04:06 UTC (rev 51366)
+++ trunk/tests/phpunit/tests/xmlrpc/wp/getPost.php 2021-07-07 10:32:56 UTC (rev 51367)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -85,7 +85,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertNotIXRError( $result );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // When no fields are requested, only the IDs should be returned.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( 1, count( $result ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 1, $result );
</ins><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame( array( 'post_id' ), array_keys( $result ) );
</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="trunktestsphpunittestsxmlrpcwpgetPostTypesphp"></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/xmlrpc/wp/getPostTypes.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/xmlrpc/wp/getPostTypes.php 2021-07-07 01:04:06 UTC (rev 51366)
+++ trunk/tests/phpunit/tests/xmlrpc/wp/getPostTypes.php 2021-07-07 10:32:56 UTC (rev 51367)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -16,7 +16,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $result = $this->myxmlrpcserver->wp_getPostTypes( array( 1, 'subscriber', 'subscriber' ) );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertNotIXRError( $result );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertIsArray( $result );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( 0, count( $result ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 0, $result );
</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"> function test_capable_user() {
</span></span></pre></div>
<a id="trunktestsphpunittestsxmlrpcwpgetPostsphp"></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/xmlrpc/wp/getPosts.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/xmlrpc/wp/getPosts.php 2021-07-07 01:04:06 UTC (rev 51366)
+++ trunk/tests/phpunit/tests/xmlrpc/wp/getPosts.php 2021-07-07 10:32:56 UTC (rev 51367)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -71,7 +71,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> );
</span><span class="cx" style="display: block; padding: 0 10px"> $results = $this->myxmlrpcserver->wp_getPosts( array( 1, 'editor', 'editor', $filter ) );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertNotIXRError( $results );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( $num_posts, count( $results ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( $num_posts, $results );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Page through results.
</span><span class="cx" style="display: block; padding: 0 10px"> $posts_found = array();
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -83,7 +83,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $filter['offset'] += $filter['number'];
</span><span class="cx" style="display: block; padding: 0 10px"> } while ( count( $presults ) > 0 );
</span><span class="cx" style="display: block; padding: 0 10px"> // Verify that $post_ids matches $posts_found.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( 0, count( array_diff( $post_ids, $posts_found ) ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 0, array_diff( $post_ids, $posts_found ) );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Add comments to some of the posts.
</span><span class="cx" style="display: block; padding: 0 10px"> foreach ( $post_ids as $key => $post_id ) {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -117,7 +117,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> );
</span><span class="cx" style="display: block; padding: 0 10px"> $results3 = $this->myxmlrpcserver->wp_getPosts( array( 1, 'editor', 'editor', $filter3 ) );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertNotIXRError( $results3 );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( 1, count( $results3 ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 1, $results3 );
</ins><span class="cx" style="display: block; padding: 0 10px"> $this->assertEquals( $post->ID, $results3[0]['post_id'] );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> _unregister_post_type( $cpt_name );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -159,13 +159,13 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $filter = array( 's' => 'Third' );
</span><span class="cx" style="display: block; padding: 0 10px"> $results = $this->myxmlrpcserver->wp_getPosts( array( 1, 'editor', 'editor', $filter ) );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertNotIXRError( $results );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( 0, count( $results ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 0, $results );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Search for one of them.
</span><span class="cx" style="display: block; padding: 0 10px"> $filter = array( 's' => 'First:' );
</span><span class="cx" style="display: block; padding: 0 10px"> $results = $this->myxmlrpcserver->wp_getPosts( array( 1, 'editor', 'editor', $filter ) );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertNotIXRError( $results );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( 1, count( $results ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 1, $results );
</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="trunktestsphpunittestsxmlrpcwpgetTermsphp"></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/xmlrpc/wp/getTerms.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/xmlrpc/wp/getTerms.php 2021-07-07 01:04:06 UTC (rev 51366)
+++ trunk/tests/phpunit/tests/xmlrpc/wp/getTerms.php 2021-07-07 10:32:56 UTC (rev 51367)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -77,7 +77,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $results = $this->myxmlrpcserver->wp_getTerms( array( 1, 'editor', 'editor', $tax_name ) );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertNotIXRError( $results );
</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( $num_terms, count( $results ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( $num_terms, $results );
</ins><span class="cx" style="display: block; padding: 0 10px"> foreach ( $results as $term ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame( $tax_name, $term['taxonomy'] );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -86,13 +86,13 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $filter = array( 'number' => 5 );
</span><span class="cx" style="display: block; padding: 0 10px"> $results2 = $this->myxmlrpcserver->wp_getTerms( array( 1, 'editor', 'editor', $tax_name, $filter ) );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertNotIXRError( $results );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( 5, count( $results2 ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 5, $results2 );
</ins><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame( $results[1]['term_id'], $results2[1]['term_id'] ); // Check one of the terms.
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $filter['offset'] = 10;
</span><span class="cx" style="display: block; padding: 0 10px"> $results3 = $this->myxmlrpcserver->wp_getTerms( array( 1, 'editor', 'editor', $tax_name, $filter ) );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertNotIXRError( $results3 );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( $num_terms - 10, count( $results3 ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( $num_terms - 10, $results3 );
</ins><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame( $results[11]['term_id'], $results3[1]['term_id'] );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Test hide_empty (since none have been attached to posts yet, all should be hidden.
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -99,7 +99,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $filter = array( 'hide_empty' => true );
</span><span class="cx" style="display: block; padding: 0 10px"> $results4 = $this->myxmlrpcserver->wp_getTerms( array( 1, 'editor', 'editor', $tax_name, $filter ) );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertNotIXRError( $results4 );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( 0, count( $results4 ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 0, $results4 );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> unset( $GLOBALS['wp_taxonomies'][ $tax_name ] );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -119,7 +119,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> );
</span><span class="cx" style="display: block; padding: 0 10px"> $results = $this->myxmlrpcserver->wp_getTerms( array( 1, 'editor', 'editor', 'category', $filter ) );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertNotIXRError( $results );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertNotEquals( 0, count( $results ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertNotCount( 0, $results );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> foreach ( $results as $term ) {
</span><span class="cx" style="display: block; padding: 0 10px"> if ( $term['term_id'] === $cat1 ) {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -140,7 +140,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $filter = array( 'search' => $name );
</span><span class="cx" style="display: block; padding: 0 10px"> $results = $this->myxmlrpcserver->wp_getTerms( array( 1, 'editor', 'editor', 'category', $filter ) );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertNotIXRError( $results );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( 1, count( $results ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 1, $results );
</ins><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame( $name, $results[0]['name'] );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertEquals( $name_id, $results[0]['term_id'] );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -148,7 +148,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $filter = array( 'search' => substr( $name, 0, 10 ) );
</span><span class="cx" style="display: block; padding: 0 10px"> $results2 = $this->myxmlrpcserver->wp_getTerms( array( 1, 'editor', 'editor', 'category', $filter ) );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertNotIXRError( $results2 );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( 1, count( $results2 ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 1, $results2 );
</ins><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame( $name, $results2[0]['name'] );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertEquals( $name_id, $results2[0]['term_id'] );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span></span></pre></div>
<a id="trunktestsphpunittestsxmlrpcwpgetUsersphp"></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/xmlrpc/wp/getUsers.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/xmlrpc/wp/getUsers.php 2021-07-07 01:04:06 UTC (rev 51366)
+++ trunk/tests/phpunit/tests/xmlrpc/wp/getUsers.php 2021-07-07 10:32:56 UTC (rev 51367)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -102,7 +102,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> } while ( count( $presults ) > 0 );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Verify that $user_ids matches $users_found.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( 0, count( array_diff( $user_ids, $users_found ) ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 0, array_diff( $user_ids, $users_found ) );
</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"> function test_order_filters() {
</span></span></pre>
</div>
</div>
</body>
</html>