<!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>[51454] 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/51454">51454</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/51454","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-18 14:10:24 +0000 (Sun, 18 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 `assertTrue( ... > 0 )` with `assertGreaterThan()` 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>, <a href="https://core.trac.wordpress.org/changeset/51367">[51367]</a>, <a href="https://core.trac.wordpress.org/changeset/51397">[51397]</a>, <a href="https://core.trac.wordpress.org/changeset/51403">[51403]</a>, <a href="https://core.trac.wordpress.org/changeset/51404">[51404]</a>, <a href="https://core.trac.wordpress.org/changeset/51436">[51436]</a>, <a href="https://core.trac.wordpress.org/changeset/51438">[51438]</a>, <a href="https://core.trac.wordpress.org/changeset/51448">[51448]</a>, <a href="https://core.trac.wordpress.org/changeset/51449">[51449]</a>, <a href="https://core.trac.wordpress.org/changeset/51451">[51451]</a>, <a href="https://core.trac.wordpress.org/changeset/51453">[51453]</a>.

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

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunktestsphpunittestsbookmarkgetBookmarksphp">trunk/tests/phpunit/tests/bookmark/getBookmarks.php</a></li>
<li><a href="#trunktestsphpunittestscronphp">trunk/tests/phpunit/tests/cron.php</a></li>
<li><a href="#trunktestsphpunittestsmetaphp">trunk/tests/phpunit/tests/meta.php</a></li>
<li><a href="#trunktestsphpunittestsmultisitenetworkphp">trunk/tests/phpunit/tests/multisite/network.php</a></li>
<li><a href="#trunktestsphpunittestspostphp">trunk/tests/phpunit/tests/post.php</a></li>
<li><a href="#trunktestsphpunittestsrestapirestcontrollerphp">trunk/tests/phpunit/tests/rest-api/rest-controller.php</a></li>
<li><a href="#trunktestsphpunitteststermwpInsertTermphp">trunk/tests/phpunit/tests/term/wpInsertTerm.php</a></li>
<li><a href="#trunktestsphpunitteststermphp">trunk/tests/phpunit/tests/term.php</a></li>
<li><a href="#trunktestsphpunitteststhemephp">trunk/tests/phpunit/tests/theme.php</a></li>
<li><a href="#trunktestsphpunittestsuserwpDeleteUserphp">trunk/tests/phpunit/tests/user/wpDeleteUser.php</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunktestsphpunittestsbookmarkgetBookmarksphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/tests/bookmark/getBookmarks.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/bookmark/getBookmarks.php       2021-07-18 14:00:35 UTC (rev 51453)
+++ trunk/tests/phpunit/tests/bookmark/getBookmarks.php 2021-07-18 14:10:24 UTC (rev 51454)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -55,7 +55,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->assertEqualSets( $bookmarks, wp_list_pluck( $found2, 'link_id' ) );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertTrue( $num_queries < $wpdb->num_queries );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertGreaterThan( $num_queries, $wpdb->num_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">        /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -82,7 +82,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                // Equal sets != same order.
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertEqualSets( $found1, $found2 );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertTrue( $num_queries < $wpdb->num_queries );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertGreaterThan( $num_queries, $wpdb->num_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_exclude_param_gets_properly_parsed_as_list() {
</span></span></pre></div>
<a id="trunktestsphpunittestscronphp"></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/cron.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/cron.php        2021-07-18 14:00:35 UTC (rev 51453)
+++ trunk/tests/phpunit/tests/cron.php  2021-07-18 14:10:24 UTC (rev 51454)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -126,8 +126,8 @@
</span><span class="cx" style="display: block; padding: 0 10px">                wp_schedule_single_event( strtotime( '+4 hour' ), $hook, $args );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                // Make sure they're returned by wp_next_scheduled().
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertTrue( wp_next_scheduled( $hook ) > 0 );
-               $this->assertTrue( wp_next_scheduled( $hook, $args ) > 0 );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertGreaterThan( 0, wp_next_scheduled( $hook ) );
+               $this->assertGreaterThan( 0, wp_next_scheduled( $hook, $args ) );
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                // Clear the schedule for the no args events and make sure it's gone.
</span><span class="cx" style="display: block; padding: 0 10px">                $hook_unscheduled = wp_clear_scheduled_hook( $hook );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -134,7 +134,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertSame( 2, $hook_unscheduled );
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertFalse( wp_next_scheduled( $hook ) );
</span><span class="cx" style="display: block; padding: 0 10px">                // The args events should still be there.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertTrue( wp_next_scheduled( $hook, $args ) > 0 );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertGreaterThan( 0, wp_next_scheduled( $hook, $args ) );
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                // Clear the schedule for the args events and make sure they're gone too.
</span><span class="cx" style="display: block; padding: 0 10px">                // Note: wp_clear_scheduled_hook() expects args passed directly, rather than as an array.
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -165,14 +165,14 @@
</span><span class="cx" style="display: block; padding: 0 10px">                wp_schedule_single_event( strtotime( '+4 hour' ), $hook, $args );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                // Make sure they're returned by wp_next_scheduled().
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertTrue( wp_next_scheduled( $hook ) > 0 );
-               $this->assertTrue( wp_next_scheduled( $hook, $args ) > 0 );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertGreaterThan( 0, wp_next_scheduled( $hook ) );
+               $this->assertGreaterThan( 0, wp_next_scheduled( $hook, $args ) );
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                // Clear the schedule for the no args events and make sure it's gone.
</span><span class="cx" style="display: block; padding: 0 10px">                wp_clear_scheduled_hook( $hook );
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertFalse( wp_next_scheduled( $hook ) );
</span><span class="cx" style="display: block; padding: 0 10px">                // The args events should still be there.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertTrue( wp_next_scheduled( $hook, $args ) > 0 );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertGreaterThan( 0, wp_next_scheduled( $hook, $args ) );
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                // Clear the schedule for the args events and make sure they're gone too.
</span><span class="cx" style="display: block; padding: 0 10px">                // Note: wp_clear_scheduled_hook() used to expect args passed directly, rather than as an array pre WP 3.0.
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -198,14 +198,14 @@
</span><span class="cx" style="display: block; padding: 0 10px">                wp_schedule_single_event( strtotime( '+6 hour' ), $multi_hook, $multi_args );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                // Make sure they're returned by wp_next_scheduled().
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertTrue( wp_next_scheduled( $hook ) > 0 );
-               $this->assertTrue( wp_next_scheduled( $hook, $args ) > 0 );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertGreaterThan( 0, wp_next_scheduled( $hook ) );
+               $this->assertGreaterThan( 0, wp_next_scheduled( $hook, $args ) );
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                // Clear the schedule for the no args events and make sure it's gone.
</span><span class="cx" style="display: block; padding: 0 10px">                wp_clear_scheduled_hook( $hook );
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertFalse( wp_next_scheduled( $hook ) );
</span><span class="cx" style="display: block; padding: 0 10px">                // The args events should still be there.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertTrue( wp_next_scheduled( $hook, $args ) > 0 );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertGreaterThan( 0, wp_next_scheduled( $hook, $args ) );
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                // Clear the schedule for the args events and make sure they're gone too.
</span><span class="cx" style="display: block; padding: 0 10px">                // wp_clear_scheduled_hook() should take args as an array like the other functions.
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -232,8 +232,8 @@
</span><span class="cx" style="display: block; padding: 0 10px">                wp_schedule_single_event( strtotime( '+4 hour' ), $hook, $args );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                // Make sure they're returned by wp_next_scheduled().
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertTrue( wp_next_scheduled( $hook ) > 0 );
-               $this->assertTrue( wp_next_scheduled( $hook, $args ) > 0 );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertGreaterThan( 0, wp_next_scheduled( $hook ) );
+               $this->assertGreaterThan( 0, wp_next_scheduled( $hook, $args ) );
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                // Clear the schedule and make sure it's gone.
</span><span class="cx" style="display: block; padding: 0 10px">                $unschedule_hook = wp_unschedule_hook( $hook );
</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-18 14:00:35 UTC (rev 51453)
+++ trunk/tests/phpunit/tests/meta.php  2021-07-18 14:10:24 UTC (rev 51454)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -344,7 +344,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">        function test_negative_meta_id() {
</span><span class="cx" style="display: block; padding: 0 10px">                $negative_mid = $this->meta_id * -1;
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertTrue( $negative_mid < 0 );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertLessThan( 0, $negative_mid );
</ins><span class="cx" style="display: block; padding: 0 10px">                 $this->assertFalse( get_metadata_by_mid( 'user', $negative_mid ) );
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertFalse( update_metadata_by_mid( 'user', $negative_mid, 'meta_new_value' ) );
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertFalse( delete_metadata_by_mid( 'user', $negative_mid ) );
</span></span></pre></div>
<a id="trunktestsphpunittestsmultisitenetworkphp"></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/network.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/multisite/network.php   2021-07-18 14:00:35 UTC (rev 51453)
+++ trunk/tests/phpunit/tests/multisite/network.php     2021-07-18 14:10:24 UTC (rev 51454)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -451,7 +451,8 @@
</span><span class="cx" style="display: block; padding: 0 10px">                        $site_count = (int) get_blog_count();
</span><span class="cx" style="display: block; padding: 0 10px">                        $user_count = (int) get_user_count();
</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->assertTrue( $site_count > 0 && $user_count > 0 );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                 $this->assertGreaterThan( 0, $site_count );
+                       $this->assertGreaterThan( 0, $user_count );
</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">@@ -466,7 +467,8 @@
</span><span class="cx" style="display: block; padding: 0 10px">                        $site_count = (int) get_blog_count( self::$different_network_id );
</span><span class="cx" style="display: block; padding: 0 10px">                        $user_count = (int) get_user_count( self::$different_network_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->assertTrue( $site_count > 0 && $user_count > 0 );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                 $this->assertGreaterThan( 0, $site_count );
+                       $this->assertGreaterThan( 0, $user_count );
</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="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-18 14:00:35 UTC (rev 51453)
+++ trunk/tests/phpunit/tests/post.php  2021-07-18 14:10:24 UTC (rev 51454)
</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">                        // Insert a post and make sure the ID is OK.
</span><span class="cx" style="display: block; padding: 0 10px">                        $id = wp_insert_post( $post );
</span><span class="cx" style="display: block; padding: 0 10px">                        $this->assertIsNumeric( $id );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                        $this->assertTrue( $id > 0 );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                 $this->assertGreaterThan( 0, $id );
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                        // Fetch the post and make sure it matches.
</span><span class="cx" style="display: block; padding: 0 10px">                        $out = get_post( $id );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -136,7 +136,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                $this->post_ids[] = $id;
</span><span class="cx" style="display: block; padding: 0 10px">                // dmp( _get_cron_array() );
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertIsNumeric( $id );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertTrue( $id > 0 );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertGreaterThan( 0, $id );
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                // Fetch the post and make sure it matches.
</span><span class="cx" style="display: block; padding: 0 10px">                $out = get_post( $id );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -259,7 +259,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                $this->post_ids[] = $id;
</span><span class="cx" style="display: block; padding: 0 10px">                // dmp( _get_cron_array() );
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertIsNumeric( $id );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertTrue( $id > 0 );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertGreaterThan( 0, $id );
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                // Fetch the post and make sure it matches.
</span><span class="cx" style="display: block; padding: 0 10px">                $out = get_post( $id );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -380,7 +380,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                $this->post_ids[] = $id;
</span><span class="cx" style="display: block; padding: 0 10px">                // dmp( _get_cron_array() );
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertIsNumeric( $id );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertTrue( $id > 0 );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertGreaterThan( 0, $id );
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                // Fetch the post and make sure it matches.
</span><span class="cx" style="display: block; padding: 0 10px">                $out = get_post( $id );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -793,7 +793,8 @@
</span><span class="cx" style="display: block; padding: 0 10px">                        ),
</span><span class="cx" style="display: block; padding: 0 10px">                );
</span><span class="cx" style="display: block; padding: 0 10px">                $insert_post_id = wp_insert_post( $post_data, true, true );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertTrue( ( is_int( $insert_post_id ) && $insert_post_id > 0 ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertIsInt( $insert_post_id );
+               $this->assertGreaterThan( 0, $insert_post_id );
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $post = get_post( $insert_post_id );
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertEquals( $post->post_author, self::$editor_id );
</span></span></pre></div>
<a id="trunktestsphpunittestsrestapirestcontrollerphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/tests/rest-api/rest-controller.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/rest-api/rest-controller.php    2021-07-18 14:00:35 UTC (rev 51453)
+++ trunk/tests/phpunit/tests/rest-api/rest-controller.php      2021-07-18 14:10:24 UTC (rev 51454)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -513,7 +513,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $first_call_count = $listener->get_call_count( $method );
</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->assertTrue( $first_call_count > 0 );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertGreaterThan( 0, $first_call_count );
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $request->set_param( '_fields', 'somestring' );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -525,7 +525,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $controller->prepare_item_for_response( $item, $request );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertTrue( $listener->get_call_count( $method ) > $first_call_count );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertGreaterThan( $first_call_count, $listener->get_call_count( $method ) );
</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="trunktestsphpunitteststermwpInsertTermphp"></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/wpInsertTerm.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/term/wpInsertTerm.php   2021-07-18 14:00:35 UTC (rev 51453)
+++ trunk/tests/phpunit/tests/term/wpInsertTerm.php     2021-07-18 14:10:24 UTC (rev 51454)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -29,13 +29,13 @@
</span><span class="cx" style="display: block; padding: 0 10px">                $t = wp_insert_term( $term, $taxonomy );
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertIsArray( $t );
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertNotWPError( $t );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertTrue( $t['term_id'] > 0 );
-               $this->assertTrue( $t['term_taxonomy_id'] > 0 );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertGreaterThan( 0, $t['term_id'] );
+               $this->assertGreaterThan( 0, $t['term_taxonomy_id'] );
</ins><span class="cx" style="display: block; padding: 0 10px">                 $this->assertEquals( $initial_count + 1, wp_count_terms( array( 'taxonomy' => $taxonomy ) ) );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                // Make sure the term exists.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertTrue( term_exists( $term ) > 0 );
-               $this->assertTrue( term_exists( $t['term_id'] ) > 0 );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertGreaterThan( 0, term_exists( $term ) );
+               $this->assertGreaterThan( 0, term_exists( $t['term_id'] ) );
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                // Now delete it.
</span><span class="cx" style="display: block; padding: 0 10px">                add_filter( 'delete_term', array( $this, 'deleted_term_cb' ), 10, 5 );
</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-18 14:00:35 UTC (rev 51453)
+++ trunk/tests/phpunit/tests/term.php  2021-07-18 14:10:24 UTC (rev 51454)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -155,12 +155,12 @@
</span><span class="cx" style="display: block; padding: 0 10px">                $t = wp_insert_category( array( 'cat_name' => $term ) );
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertIsNumeric( $t );
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertNotWPError( $t );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertTrue( $t > 0 );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertGreaterThan( 0, $t );
</ins><span class="cx" style="display: block; padding: 0 10px">                 $this->assertEquals( $initial_count + 1, wp_count_terms( array( 'taxonomy' => 'category' ) ) );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                // Make sure the term exists.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertTrue( term_exists( $term ) > 0 );
-               $this->assertTrue( term_exists( $t ) > 0 );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertGreaterThan( 0, term_exists( $term ) );
+               $this->assertGreaterThan( 0, term_exists( $t ) );
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                // Now delete it.
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertTrue( wp_delete_category( $t ) );
</span></span></pre></div>
<a id="trunktestsphpunitteststhemephp"></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.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/theme.php       2021-07-18 14:00:35 UTC (rev 51453)
+++ trunk/tests/phpunit/tests/theme.php 2021-07-18 14:10:24 UTC (rev 51454)
</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">                        // Important attributes should all not be empty as well.
</span><span class="cx" style="display: block; padding: 0 10px">                        $this->assertNotEmpty( $theme['Description'] );
</span><span class="cx" style="display: block; padding: 0 10px">                        $this->assertNotEmpty( $theme['Author'] );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                        $this->assertTrue( version_compare( $theme['Version'], 0 ) > 0 );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                 $this->assertGreaterThan( 0, version_compare( $theme['Version'], 0 ) );
</ins><span class="cx" style="display: block; padding: 0 10px">                         $this->assertNotEmpty( $theme['Template'] );
</span><span class="cx" style="display: block; padding: 0 10px">                        $this->assertNotEmpty( $theme['Stylesheet'] );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span></span></pre></div>
<a id="trunktestsphpunittestsuserwpDeleteUserphp"></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/wpDeleteUser.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/user/wpDeleteUser.php   2021-07-18 14:00:35 UTC (rev 51453)
+++ trunk/tests/phpunit/tests/user/wpDeleteUser.php     2021-07-18 14:10:24 UTC (rev 51454)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -68,7 +68,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                // Insert a post and make sure the ID is OK.
</span><span class="cx" style="display: block; padding: 0 10px">                $post_id = wp_insert_post( $post );
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertIsNumeric( $post_id );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertTrue( $post_id > 0 );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertGreaterThan( 0, $post_id );
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</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">                $this->assertSame( $post_id, $post->ID );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -84,7 +84,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                // Insert a post and make sure the ID is OK.
</span><span class="cx" style="display: block; padding: 0 10px">                $nav_id = wp_insert_post( $post );
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertIsNumeric( $nav_id );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertTrue( $nav_id > 0 );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertGreaterThan( 0, $nav_id );
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $post = get_post( $nav_id );
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertSame( $nav_id, $post->ID );
</span></span></pre>
</div>
</div>

</body>
</html>