<!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>[51404] 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/51404">51404</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/51404","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-12 10:35:44 +0000 (Mon, 12 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( in_array( ... ) )` with `assertContains()` 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>.

Props hellofromTonya, jrf, SergeyBiryukov.
Fixes <a href="https://core.trac.wordpress.org/ticket/53123">#53123</a>. See <a href="https://core.trac.wordpress.org/ticket/53363">#53363</a>.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunktestsphpunittestsajaxDeleteCommentphp">trunk/tests/phpunit/tests/ajax/DeleteComment.php</a></li>
<li><a href="#trunktestsphpunittestsajaxDimCommentphp">trunk/tests/phpunit/tests/ajax/DimComment.php</a></li>
<li><a href="#trunktestsphpunittestsajaxResponsephp">trunk/tests/phpunit/tests/ajax/Response.php</a></li>
<li><a href="#trunktestsphpunittestsfeedatomphp">trunk/tests/phpunit/tests/feed/atom.php</a></li>
<li><a href="#trunktestsphpunittestsformattingEscUrlphp">trunk/tests/phpunit/tests/formatting/EscUrl.php</a></li>
<li><a href="#trunktestsphpunittestsoembedheadersphp">trunk/tests/phpunit/tests/oembed/headers.php</a></li>
<li><a href="#trunktestsphpunittestspluggablephp">trunk/tests/phpunit/tests/pluggable.php</a></li>
<li><a href="#trunktestsphpunittestspostmetaphp">trunk/tests/phpunit/tests/post/meta.php</a></li>
<li><a href="#trunktestsphpunittestspostobjectsphp">trunk/tests/phpunit/tests/post/objects.php</a></li>
<li><a href="#trunktestsphpunittestspostwpPostTypephp">trunk/tests/phpunit/tests/post/wpPostType.php</a></li>
<li><a href="#trunktestsphpunittestsrestapirestattachmentscontrollerphp">trunk/tests/phpunit/tests/rest-api/rest-attachments-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="#trunktestsphpunittestsrestapirestpostscontrollerphp">trunk/tests/phpunit/tests/rest-api/rest-posts-controller.php</a></li>
<li><a href="#trunktestsphpunittestsrestapirestrequestphp">trunk/tests/phpunit/tests/rest-api/rest-request.php</a></li>
<li><a href="#trunktestsphpunittestsrestapiresttagscontrollerphp">trunk/tests/phpunit/tests/rest-api/rest-tags-controller.php</a></li>
<li><a href="#trunktestsphpunittestsrestapirestuserscontrollerphp">trunk/tests/phpunit/tests/rest-api/rest-users-controller.php</a></li>
<li><a href="#trunktestsphpunittestsrestapiphp">trunk/tests/phpunit/tests/rest-api.php</a></li>
<li><a href="#trunktestsphpunitteststermwpInsertTermphp">trunk/tests/phpunit/tests/term/wpInsertTerm.php</a></li>
<li><a href="#trunktestsphpunitteststermwpTaxonomyphp">trunk/tests/phpunit/tests/term/wpTaxonomy.php</a></li>
<li><a href="#trunktestsphpunitteststermwpUpdateTermphp">trunk/tests/phpunit/tests/term/wpUpdateTerm.php</a></li>
<li><a href="#trunktestsphpunitteststhemethemeDirphp">trunk/tests/phpunit/tests/theme/themeDir.php</a></li>
<li><a href="#trunktestsphpunittestsuserphp">trunk/tests/phpunit/tests/user.php</a></li>
<li><a href="#trunktestsphpunittestswpphp">trunk/tests/phpunit/tests/wp.php</a></li>
<li><a href="#trunktestsphpunittestsxmlrpcwpeditPostphp">trunk/tests/phpunit/tests/xmlrpc/wp/editPost.php</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunktestsphpunittestsajaxDeleteCommentphp"></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/DeleteComment.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/ajax/DeleteComment.php  2021-07-11 12:41:48 UTC (rev 51403)
+++ trunk/tests/phpunit/tests/ajax/DeleteComment.php    2021-07-12 10:35:44 UTC (rev 51404)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -108,7 +108,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                // Check for either possible total.
</span><span class="cx" style="display: block; padding: 0 10px">                $message = sprintf( 'returned value: %1$d $total: %2$d  $recalc_total: %3$d', (int) $xml->response[0]->comment[0]->supplemental[0]->total[0], $total, $recalc_total );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertTrue( in_array( (int) $xml->response[0]->comment[0]->supplemental[0]->total[0], array( $total, $recalc_total ), true ), $message );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertContains( (int) $xml->response[0]->comment[0]->supplemental[0]->total[0], array( $total, $recalc_total ), $message );
</ins><span class="cx" style="display: block; padding: 0 10px">         }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">        /**
</span></span></pre></div>
<a id="trunktestsphpunittestsajaxDimCommentphp"></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/DimComment.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/ajax/DimComment.php     2021-07-11 12:41:48 UTC (rev 51403)
+++ trunk/tests/phpunit/tests/ajax/DimComment.php       2021-07-12 10:35:44 UTC (rev 51404)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -103,7 +103,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                $total = $_POST['_total'] - 1;
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                // Check for either possible total.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertTrue( in_array( (int) $xml->response[0]->comment[0]->supplemental[0]->total[0], array( $total, $recalc_total ), true ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertContains( (int) $xml->response[0]->comment[0]->supplemental[0]->total[0], array( $total, $recalc_total ) );
</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="trunktestsphpunittestsajaxResponsephp"></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/Response.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/ajax/Response.php       2021-07-11 12:41:48 UTC (rev 51403)
+++ trunk/tests/phpunit/tests/ajax/Response.php 2021-07-12 10:35:44 UTC (rev 51404)
</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">                $headers = xdebug_get_headers();
</span><span class="cx" style="display: block; padding: 0 10px">                ob_end_clean();
</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( in_array( 'Content-Type: text/xml; charset=' . get_option( 'blog_charset' ), $headers, true ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertContains( 'Content-Type: text/xml; charset=' . get_option( 'blog_charset' ), $headers );
</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="trunktestsphpunittestsfeedatomphp"></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/atom.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/feed/atom.php   2021-07-11 12:41:48 UTC (rev 51403)
+++ trunk/tests/phpunit/tests/feed/atom.php     2021-07-12 10:35:44 UTC (rev 51404)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -186,7 +186,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                        }
</span><span class="cx" style="display: block; padding: 0 10px">                        $categories = xml_find( $entries[ $key ]['child'], 'category' );
</span><span class="cx" style="display: block; padding: 0 10px">                        foreach ( $categories as $category ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                $this->assertTrue( in_array( $category['attributes']['term'], $terms, true ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                         $this->assertContains( $category['attributes']['term'], $terms );
</ins><span class="cx" style="display: block; padding: 0 10px">                         }
</span><span class="cx" style="display: block; padding: 0 10px">                        unset( $terms );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span></span></pre></div>
<a id="trunktestsphpunittestsformattingEscUrlphp"></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/formatting/EscUrl.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/formatting/EscUrl.php   2021-07-11 12:41:48 UTC (rev 51403)
+++ trunk/tests/phpunit/tests/formatting/EscUrl.php     2021-07-12 10:35:44 UTC (rev 51404)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -127,10 +127,10 @@
</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->assertTrue( ! in_array( 'data', wp_allowed_protocols(), true ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertNotContains( 'data', wp_allowed_protocols() );
</ins><span class="cx" style="display: block; padding: 0 10px">                 $this->assertSame( '', esc_url( 'data:text/plain;base64,SGVsbG8sIFdvcmxkIQ%3D%3D' ) );
</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( ! in_array( 'foo', wp_allowed_protocols(), true ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertNotContains( 'foo', wp_allowed_protocols() );
</ins><span class="cx" style="display: block; padding: 0 10px">                 $this->assertSame(
</span><span class="cx" style="display: block; padding: 0 10px">                        'foo://example.com',
</span><span class="cx" style="display: block; padding: 0 10px">                        esc_url(
</span></span></pre></div>
<a id="trunktestsphpunittestsoembedheadersphp"></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/oembed/headers.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/oembed/headers.php      2021-07-11 12:41:48 UTC (rev 51403)
+++ trunk/tests/phpunit/tests/oembed/headers.php        2021-07-12 10:35:44 UTC (rev 51404)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -31,6 +31,6 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $headers = xdebug_get_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->assertTrue( in_array( 'Content-Type: text/xml; charset=' . get_option( 'blog_charset' ), $headers, true ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertContains( 'Content-Type: text/xml; charset=' . get_option( 'blog_charset' ), $headers );
</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="trunktestsphpunittestspluggablephp"></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/pluggable.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/pluggable.php   2021-07-11 12:41:48 UTC (rev 51403)
+++ trunk/tests/phpunit/tests/pluggable.php     2021-07-12 10:35:44 UTC (rev 51404)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -62,7 +62,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                foreach ( $expected as $function => $sig ) {
</span><span class="cx" style="display: block; padding: 0 10px">                        $msg = 'Function: ' . $function . '()';
</span><span class="cx" style="display: block; padding: 0 10px">                        $this->assertTrue( function_exists( $function ), $msg );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                        $this->assertTrue( in_array( $function, $defined, true ), $msg );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                 $this->assertContains( $function, $defined, $msg );
</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="trunktestsphpunittestspostmetaphp"></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/meta.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/post/meta.php   2021-07-11 12:41:48 UTC (rev 51403)
+++ trunk/tests/phpunit/tests/post/meta.php     2021-07-12 10:35:44 UTC (rev 51404)
</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">                        'another value',
</span><span class="cx" style="display: block; padding: 0 10px">                );
</span><span class="cx" style="display: block; padding: 0 10px">                sort( $expected );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertTrue( in_array( get_post_meta( self::$post_id, 'nonunique', true ), $expected, true ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertContains( get_post_meta( self::$post_id, 'nonunique', true ), $expected );
</ins><span class="cx" style="display: block; padding: 0 10px">                 $actual = get_post_meta( self::$post_id, 'nonunique', false );
</span><span class="cx" style="display: block; padding: 0 10px">                sort( $actual );
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertSame( $expected, $actual );
</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-11 12:41:48 UTC (rev 51403)
+++ trunk/tests/phpunit/tests/post/objects.php  2021-07-12 10:35:44 UTC (rev 51404)
</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">                $post = get_post( $id, ARRAY_N );
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertIsArray( $post );
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertArrayNotHasKey( 'post_type', $post );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertTrue( in_array( 'post', $post, true ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertContains( 'post', $post );
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $post = get_post( $id );
</span><span class="cx" style="display: block; padding: 0 10px">                $post = get_post( $post, ARRAY_A );
</span></span></pre></div>
<a id="trunktestsphpunittestspostwpPostTypephp"></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/wpPostType.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/post/wpPostType.php     2021-07-11 12:41:48 UTC (rev 51403)
+++ trunk/tests/phpunit/tests/post/wpPostType.php       2021-07-12 10:35:44 UTC (rev 51404)
</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">                $post_type_object->add_rewrite_rules();
</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->assertFalse( in_array( 'foobar', $wp->public_query_vars, true ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertNotContains( 'foobar', $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 class="cx" style="display: block; padding: 0 10px">        public function test_adds_query_var_if_public() {
</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-11 12:41:48 UTC (rev 51403)
+++ trunk/tests/phpunit/tests/rest-api/rest-attachments-controller.php  2021-07-12 10:35:44 UTC (rev 51404)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -302,9 +302,9 @@
</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->assertCount( 2, $data );
</span><span class="cx" style="display: block; padding: 0 10px">                $ids = wp_list_pluck( $data, 'id' );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertTrue( in_array( $id1, $ids, true ) );
-               $this->assertFalse( in_array( $id2, $ids, true ) );
-               $this->assertTrue( in_array( $id3, $ids, true ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertContains( $id1, $ids );
+               $this->assertNotContains( $id2, $ids );
+               $this->assertContains( $id3, $ids );
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $this->check_get_posts_response( $response );
</span><span class="cx" style="display: block; padding: 0 10px">        }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -343,9 +343,9 @@
</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->assertCount( 3, $data );
</span><span class="cx" style="display: block; padding: 0 10px">                $ids = wp_list_pluck( $data, 'id' );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertTrue( in_array( $id1, $ids, true ) );
-               $this->assertTrue( in_array( $id2, $ids, true ) );
-               $this->assertTrue( in_array( $id3, $ids, true ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertContains( $id1, $ids );
+               $this->assertContains( $id2, $ids );
+               $this->assertContains( $id3, $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">        public function test_get_items_media_type() {
</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-11 12:41:48 UTC (rev 51403)
+++ trunk/tests/phpunit/tests/rest-api/rest-categories-controller.php   2021-07-12 10:35:44 UTC (rev 51404)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -311,15 +311,15 @@
</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">                $ids      = wp_list_pluck( $data, 'id' );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertTrue( in_array( $id1, $ids, true ) );
-               $this->assertTrue( in_array( $id2, $ids, true ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertContains( $id1, $ids );
+               $this->assertContains( $id2, $ids );
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $request->set_param( 'exclude', array( $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><span class="cx" style="display: block; padding: 0 10px">                $ids      = wp_list_pluck( $data, 'id' );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertTrue( in_array( $id1, $ids, true ) );
-               $this->assertFalse( in_array( $id2, $ids, true ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertContains( $id1, $ids );
+               $this->assertNotContains( $id2, $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">        public function test_get_items_orderby_args() {
</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-11 12:41:48 UTC (rev 51403)
+++ trunk/tests/phpunit/tests/rest-api/rest-comments-controller.php     2021-07-12 10:35:44 UTC (rev 51404)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -247,7 +247,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">                $collection_data = $response->get_data();
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertTrue( in_array( $password_comment, wp_list_pluck( $collection_data, 'id' ), true ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertContains( $password_comment, wp_list_pluck( $collection_data, 'id' ) );
</ins><span class="cx" style="display: block; padding: 0 10px">         }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">        /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -270,7 +270,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">                $collection_data = $response->get_data();
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertFalse( in_array( $password_comment, wp_list_pluck( $collection_data, 'id' ), true ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertNotContains( $password_comment, wp_list_pluck( $collection_data, 'id' ) );
</ins><span class="cx" style="display: block; padding: 0 10px">         }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">        /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -310,7 +310,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">                $collection_data = $response->get_data();
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertFalse( in_array( $password_comment, wp_list_pluck( $collection_data, 'id' ), true ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertNotContains( $password_comment, wp_list_pluck( $collection_data, 'id' ) );
</ins><span class="cx" style="display: block; padding: 0 10px">         }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">        public function test_get_password_items_with_edit_post_permission() {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -329,7 +329,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">                $collection_data = $response->get_data();
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertTrue( in_array( $password_comment, wp_list_pluck( $collection_data, 'id' ), true ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertContains( $password_comment, wp_list_pluck( $collection_data, 'id' ) );
</ins><span class="cx" style="display: block; padding: 0 10px">         }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">        public function test_get_items_without_private_post_permission() {
</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">                $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">                $collection_data = $response->get_data();
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertFalse( in_array( $private_comment, wp_list_pluck( $collection_data, 'id' ), true ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertNotContains( $private_comment, wp_list_pluck( $collection_data, 'id' ) );
</ins><span class="cx" style="display: block; padding: 0 10px">         }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">        public function test_get_items_with_private_post_permission() {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -367,7 +367,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">                $collection_data = $response->get_data();
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertTrue( in_array( $private_comment, wp_list_pluck( $collection_data, 'id' ), true ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertContains( $private_comment, wp_list_pluck( $collection_data, 'id' ) );
</ins><span class="cx" style="display: block; padding: 0 10px">         }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">        public function test_get_items_with_invalid_post() {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -386,7 +386,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">                $collection_data = $response->get_data();
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertFalse( in_array( $comment_id, wp_list_pluck( $collection_data, 'id' ), true ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertNotContains( $comment_id, wp_list_pluck( $collection_data, 'id' ) );
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                wp_delete_comment( $comment_id );
</span><span class="cx" style="display: block; padding: 0 10px">        }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -407,7 +407,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">                $collection_data = $response->get_data();
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertTrue( in_array( $comment_id, wp_list_pluck( $collection_data, 'id' ), true ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertContains( $comment_id, wp_list_pluck( $collection_data, 'id' ) );
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                wp_delete_comment( $comment_id );
</span><span class="cx" style="display: block; padding: 0 10px">        }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -525,15 +525,15 @@
</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">                $ids      = wp_list_pluck( $data, 'id' );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertTrue( in_array( $id1, $ids, true ) );
-               $this->assertTrue( in_array( $id2, $ids, true ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertContains( $id1, $ids );
+               $this->assertContains( $id2, $ids );
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $request->set_param( 'exclude', array( $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><span class="cx" style="display: block; padding: 0 10px">                $ids      = wp_list_pluck( $data, 'id' );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertTrue( in_array( $id1, $ids, true ) );
-               $this->assertFalse( in_array( $id2, $ids, true ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertContains( $id1, $ids );
+               $this->assertNotContains( $id2, $ids );
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                // Invalid 'exclude' should error.
</span><span class="cx" style="display: block; padding: 0 10px">                $request->set_param( 'exclude', array( 'invalid' ) );
</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-11 12:41:48 UTC (rev 51403)
+++ trunk/tests/phpunit/tests/rest-api/rest-posts-controller.php        2021-07-12 10:35:44 UTC (rev 51404)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -475,22 +475,22 @@
</span><span class="cx" style="display: block; padding: 0 10px">                $response = rest_get_server()->dispatch( $request );
</span><span class="cx" style="display: block; padding: 0 10px">                $data     = $response->get_data();
</span><span class="cx" style="display: block; padding: 0 10px">                $ids      = wp_list_pluck( $data, 'id' );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertTrue( in_array( $id1, $ids, true ) );
-               $this->assertTrue( in_array( $id2, $ids, true ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertContains( $id1, $ids );
+               $this->assertContains( $id2, $ids );
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $request->set_param( 'exclude', array( $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><span class="cx" style="display: block; padding: 0 10px">                $ids      = wp_list_pluck( $data, 'id' );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertTrue( in_array( $id1, $ids, true ) );
-               $this->assertFalse( in_array( $id2, $ids, true ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertContains( $id1, $ids );
+               $this->assertNotContains( $id2, $ids );
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $request->set_param( 'exclude', (string) $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><span class="cx" style="display: block; padding: 0 10px">                $ids      = wp_list_pluck( $data, 'id' );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertTrue( in_array( $id1, $ids, true ) );
-               $this->assertFalse( in_array( $id2, $ids, true ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertContains( $id1, $ids );
+               $this->assertNotContains( $id2, $ids );
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $request->set_param( 'exclude', 'invalid' );
</span><span class="cx" style="display: block; padding: 0 10px">                $response = rest_get_server()->dispatch( $request );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1482,9 +1482,9 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $posts = $response->get_data();
</span><span class="cx" style="display: block; padding: 0 10px">                $ids   = wp_list_pluck( $posts, 'id' );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertTrue( in_array( $id1, $ids, true ) );
-               $this->assertFalse( in_array( $id2, $ids, true ) );
-               $this->assertFalse( in_array( $id3, $ids, true ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertContains( $id1, $ids );
+               $this->assertNotContains( $id2, $ids );
+               $this->assertNotContains( $id3, $ids);
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertPostsWhere( " AND {posts}.ID NOT IN ($id3,$id2) AND {posts}.post_type = 'post' AND (({posts}.post_status = 'publish'))" );
</span><span class="cx" style="display: block; padding: 0 10px">        }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1508,9 +1508,9 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $posts = $response->get_data();
</span><span class="cx" style="display: block; padding: 0 10px">                $ids   = wp_list_pluck( $posts, 'id' );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertTrue( in_array( $id1, $ids, true ) );
-               $this->assertTrue( in_array( $id2, $ids, true ) );
-               $this->assertFalse( in_array( $id3, $ids, true ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertContains( $id1, $ids );
+               $this->assertContains( $id2, $ids );
+               $this->assertNotContains( $id3, $ids );
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertPostsWhere( " AND {posts}.ID NOT IN ($id3) AND {posts}.post_type = 'post' AND (({posts}.post_status = 'publish'))" );
</span><span class="cx" style="display: block; padding: 0 10px">        }
</span></span></pre></div>
<a id="trunktestsphpunittestsrestapirestrequestphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/tests/rest-api/rest-request.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/rest-api/rest-request.php       2021-07-11 12:41:48 UTC (rev 51403)
+++ trunk/tests/phpunit/tests/rest-api/rest-request.php 2021-07-12 10:35:44 UTC (rev 51404)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -616,8 +616,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $data = $valid->get_error_data( 'rest_missing_callback_param' );
</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( in_array( 'someinteger', $data['params'], true ) );
-               $this->assertTrue( in_array( 'someotherinteger', $data['params'], true ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertContains( 'someinteger', $data['params'] );
+               $this->assertContains( 'someotherinteger', $data['params'] );
</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_has_valid_params_validate_callback() {
</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-11 12:41:48 UTC (rev 51403)
+++ trunk/tests/phpunit/tests/rest-api/rest-tags-controller.php 2021-07-12 10:35:44 UTC (rev 51404)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -245,15 +245,15 @@
</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">                $ids      = wp_list_pluck( $data, 'id' );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertTrue( in_array( $id1, $ids, true ) );
-               $this->assertTrue( in_array( $id2, $ids, true ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertContains( $id1, $ids );
+               $this->assertContains( $id2, $ids );
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $request->set_param( 'exclude', array( $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><span class="cx" style="display: block; padding: 0 10px">                $ids      = wp_list_pluck( $data, 'id' );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertTrue( in_array( $id1, $ids, true ) );
-               $this->assertFalse( in_array( $id2, $ids, true ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertContains( $id1, $ids );
+               $this->assertNotContains( $id2, $ids );
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                // Invalid 'exclude' should error.
</span><span class="cx" style="display: block; padding: 0 10px">                $request->set_param( 'exclude', array( 'invalid' ) );
</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-11 12:41:48 UTC (rev 51403)
+++ trunk/tests/phpunit/tests/rest-api/rest-users-controller.php        2021-07-12 10:35:44 UTC (rev 51404)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -277,9 +277,9 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $user_ids = wp_list_pluck( $users, '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( in_array( self::$editor, $user_ids, true ) );
-               $this->assertTrue( in_array( self::$authors['r_true_p_true'], $user_ids, true ) );
-               $this->assertTrue( in_array( self::$authors['r_true_p_false'], $user_ids, true ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertContains( self::$editor, $user_ids );
+               $this->assertContains( self::$authors['r_true_p_true'], $user_ids );
+               $this->assertContains( self::$authors['r_true_p_false'], $user_ids );
</ins><span class="cx" style="display: block; padding: 0 10px">                 $this->assertCount( 3, $user_ids );
</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">@@ -289,8 +289,8 @@
</span><span class="cx" style="display: block; padding: 0 10px">                $users    = $response->get_data();
</span><span class="cx" style="display: block; padding: 0 10px">                $user_ids = wp_list_pluck( $users, '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->assertFalse( in_array( self::$authors['r_false_p_true'], $user_ids, true ) );
-               $this->assertFalse( in_array( self::$authors['r_false_p_false'], $user_ids, true ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertNotContains( self::$authors['r_false_p_true'], $user_ids );
+               $this->assertNotContains( self::$authors['r_false_p_false'], $user_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">        public function test_get_items_unauthenticated_does_not_include_users_without_published_posts() {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -299,8 +299,8 @@
</span><span class="cx" style="display: block; padding: 0 10px">                $users    = $response->get_data();
</span><span class="cx" style="display: block; padding: 0 10px">                $user_ids = wp_list_pluck( $users, '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->assertFalse( in_array( self::$draft_editor, $user_ids, true ) );
-               $this->assertFalse( in_array( self::$user, $user_ids, true ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertNotContains( self::$draft_editor, $user_ids );
+               $this->assertNotContains( self::$user, $user_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">        public function test_get_items_pagination_headers() {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -633,15 +633,15 @@
</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">                $ids      = wp_list_pluck( $data, 'id' );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertTrue( in_array( $id1, $ids, true ) );
-               $this->assertTrue( in_array( $id2, $ids, true ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertContains( $id1, $ids );
+               $this->assertContains( $id2, $ids );
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $request->set_param( 'exclude', array( $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><span class="cx" style="display: block; padding: 0 10px">                $ids      = wp_list_pluck( $data, 'id' );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertTrue( in_array( $id1, $ids, true ) );
-               $this->assertFalse( in_array( $id2, $ids, true ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertContains( $id1, $ids );
+               $this->assertNotContains( $id2, $ids );
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                // Invalid 'exclude' should error.
</span><span class="cx" style="display: block; padding: 0 10px">                $request->set_param( 'exclude', 'none-of-those-please' );
</span></span></pre></div>
<a id="trunktestsphpunittestsrestapiphp"></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.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/rest-api.php    2021-07-11 12:41:48 UTC (rev 51403)
+++ trunk/tests/phpunit/tests/rest-api.php      2021-07-12 10:35:44 UTC (rev 51404)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -265,7 +265,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">         */
</span><span class="cx" style="display: block; padding: 0 10px">        function test_rest_route_query_var() {
</span><span class="cx" style="display: block; padding: 0 10px">                rest_api_init();
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertTrue( in_array( 'rest_route', $GLOBALS['wp']->public_query_vars, true ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertContains( 'rest_route', $GLOBALS['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 class="cx" style="display: block; padding: 0 10px">        public function test_route_method() {
</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-11 12:41:48 UTC (rev 51403)
+++ trunk/tests/phpunit/tests/term/wpInsertTerm.php     2021-07-12 10:35:44 UTC (rev 51404)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -822,7 +822,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $cached_children = get_option( 'wptests_tax_children' );
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertNotEmpty( $cached_children[ $t ] );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertTrue( in_array( $found['term_id'], $cached_children[ $t ], true ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertContains( $found['term_id'], $cached_children[ $t ] );
</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="trunktestsphpunitteststermwpTaxonomyphp"></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/wpTaxonomy.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/term/wpTaxonomy.php     2021-07-11 12:41:48 UTC (rev 51403)
+++ trunk/tests/phpunit/tests/term/wpTaxonomy.php       2021-07-12 10:35:44 UTC (rev 51404)
</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">                $taxonomy_object = new WP_Taxonomy( $taxonomy, 'post' );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $taxonomy_object->add_rewrite_rules();
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertFalse( in_array( 'foobar', $wp->public_query_vars, true ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertNotContains( 'foobar', $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 class="cx" style="display: block; padding: 0 10px">        public function test_adds_query_var_if_public() {
</span></span></pre></div>
<a id="trunktestsphpunitteststermwpUpdateTermphp"></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/wpUpdateTerm.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/term/wpUpdateTerm.php   2021-07-11 12:41:48 UTC (rev 51403)
+++ trunk/tests/phpunit/tests/term/wpUpdateTerm.php     2021-07-12 10:35:44 UTC (rev 51404)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -685,7 +685,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $cached_children = get_option( 'wptests_tax_children' );
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertNotEmpty( $cached_children[ $t2 ] );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertTrue( in_array( $found['term_id'], $cached_children[ $t2 ], true ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertContains( $found['term_id'], $cached_children[ $t2 ] );
</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="trunktestsphpunitteststhemethemeDirphp"></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/themeDir.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/theme/themeDir.php      2021-07-11 12:41:48 UTC (rev 51403)
+++ trunk/tests/phpunit/tests/theme/themeDir.php        2021-07-12 10:35:44 UTC (rev 51404)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -208,7 +208,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertNotEmpty( $theme );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $templates = $theme['Template Files'];
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertTrue( in_array( $this->theme_root . '/page-templates/template-top-level.php', $templates, true ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertContains( $this->theme_root . '/page-templates/template-top-level.php', $templates );
</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-11 12:41:48 UTC (rev 51403)
+++ trunk/tests/phpunit/tests/user.php  2021-07-12 10:35:44 UTC (rev 51404)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1113,7 +1113,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->assertTrue( in_array( (string) self::$contrib_id, $users, true ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertContains( (string) self::$contrib_id, $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">        public function test_search_users_url() {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1124,7 +1124,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->assertTrue( in_array( (string) self::$contrib_id, $users, true ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertContains( (string) self::$contrib_id, $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">        public function test_search_users_email() {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1135,7 +1135,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->assertTrue( in_array( (string) self::$contrib_id, $users, true ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertContains( (string) self::$contrib_id, $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">        public function test_search_users_nicename() {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1146,7 +1146,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->assertTrue( in_array( (string) self::$contrib_id, $users, true ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertContains( (string) self::$contrib_id, $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">        public function test_search_users_display_name() {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1157,7 +1157,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->assertTrue( in_array( (string) self::$contrib_id, $users, true ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertContains( (string) self::$contrib_id, $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="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-11 12:41:48 UTC (rev 51403)
+++ trunk/tests/phpunit/tests/wp.php    2021-07-12 10:35:44 UTC (rev 51404)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -22,8 +22,8 @@
</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><span class="cx" style="display: block; padding: 0 10px">                $this->assertCount( $public_qv_count + 2, $this->wp->public_query_vars );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertTrue( in_array( 'test', $this->wp->public_query_vars, true ) );
-               $this->assertTrue( in_array( 'test2', $this->wp->public_query_vars, true ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertContains( 'test', $this->wp->public_query_vars );
+               $this->assertContains( 'test2', $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 class="cx" style="display: block; padding: 0 10px">        public function test_remove_query_var() {
</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">                $public_qv_count = count( $this->wp->public_query_vars );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $this->wp->add_query_var( 'test' );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertTrue( in_array( 'test', $this->wp->public_query_vars, true ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertContains( 'test', $this->wp->public_query_vars );
</ins><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><span class="cx" style="display: block; padding: 0 10px">                $this->assertCount( $public_qv_count, $this->wp->public_query_vars );
</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-11 12:41:48 UTC (rev 51403)
+++ trunk/tests/phpunit/tests/xmlrpc/wp/editPost.php    2021-07-12 10:35:44 UTC (rev 51404)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -445,7 +445,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertCount( 1, get_post_meta( $post_id, 'enclosure' ) );
</span><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><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertTrue( in_array( $enclosure_string, get_post_meta( $post_id, 'enclosure' ), true ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertContains( $enclosure_string, 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">                // Attempt to add a brand new enclosure via XML-RPC.
</span><span class="cx" style="display: block; padding: 0 10px">                $this->myxmlrpcserver->add_enclosure_if_new( $post_id, $new_enclosure );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -455,10 +455,10 @@
</span><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><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertTrue( in_array( $new_enclosure_string, get_post_meta( $post_id, 'enclosure' ), true ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertContains( $new_enclosure_string, 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 old enclosure is in the enclosure meta.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertTrue( in_array( $enclosure_string, get_post_meta( $post_id, 'enclosure' ), true ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertContains( $enclosure_string, 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"> 
</span><span class="cx" style="display: block; padding: 0 10px">        /**
</span></span></pre>
</div>
</div>

</body>
</html>