<!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>[49004] trunk/tests/phpunit/tests: Coding Standards: Give the `$id` variable in slashed data tests a more descriptive name.</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/49004">49004</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/49004","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>2020-09-19 10:53:15 +0000 (Sat, 19 Sep 2020)</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'>Coding Standards: Give the `$id` variable in slashed data tests a more descriptive name.

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

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunktestsphpunittestsattachmentslashesphp">trunk/tests/phpunit/tests/attachment/slashes.php</a></li>
<li><a href="#trunktestsphpunittestscommentslashesphp">trunk/tests/phpunit/tests/comment/slashes.php</a></li>
<li><a href="#trunktestsphpunittestsmetaslashesphp">trunk/tests/phpunit/tests/meta/slashes.php</a></li>
<li><a href="#trunktestsphpunittestspostslashesphp">trunk/tests/phpunit/tests/post/slashes.php</a></li>
<li><a href="#trunktestsphpunitteststermslashesphp">trunk/tests/phpunit/tests/term/slashes.php</a></li>
<li><a href="#trunktestsphpunittestsuserslashesphp">trunk/tests/phpunit/tests/user/slashes.php</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunktestsphpunittestsattachmentslashesphp"></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/attachment/slashes.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/attachment/slashes.php  2020-09-19 10:34:54 UTC (rev 49003)
+++ trunk/tests/phpunit/tests/attachment/slashes.php    2020-09-19 10:53:15 UTC (rev 49004)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -32,7 +32,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">         * Tests the model function that expects slashed data.
</span><span class="cx" style="display: block; padding: 0 10px">         */
</span><span class="cx" style="display: block; padding: 0 10px">        function test_wp_insert_attachment() {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $id   = wp_insert_attachment(
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $post_id = wp_insert_attachment(
</ins><span class="cx" style="display: block; padding: 0 10px">                         array(
</span><span class="cx" style="display: block; padding: 0 10px">                                'post_status'           => 'publish',
</span><span class="cx" style="display: block; padding: 0 10px">                                'post_title'            => $this->slash_1,
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -41,13 +41,13 @@
</span><span class="cx" style="display: block; padding: 0 10px">                                'post_type'             => 'post',
</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">-                $post = get_post( $id );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $post    = get_post( $post_id );
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertSame( wp_unslash( $this->slash_1 ), $post->post_title );
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertSame( wp_unslash( $this->slash_3 ), $post->post_content_filtered );
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertSame( wp_unslash( $this->slash_5 ), $post->post_excerpt );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $id   = wp_insert_attachment(
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $post_id = wp_insert_attachment(
</ins><span class="cx" style="display: block; padding: 0 10px">                         array(
</span><span class="cx" style="display: block; padding: 0 10px">                                'post_status'           => 'publish',
</span><span class="cx" style="display: block; padding: 0 10px">                                'post_title'            => $this->slash_2,
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -56,7 +56,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                                'post_type'             => 'post',
</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">-                $post = get_post( $id );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $post    = get_post( $post_id );
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertSame( wp_unslash( $this->slash_2 ), $post->post_title );
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertSame( wp_unslash( $this->slash_4 ), $post->post_content_filtered );
</span></span></pre></div>
<a id="trunktestsphpunittestscommentslashesphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/tests/comment/slashes.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/comment/slashes.php     2020-09-19 10:34:54 UTC (rev 49003)
+++ trunk/tests/phpunit/tests/comment/slashes.php       2020-09-19 10:53:15 UTC (rev 49004)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -37,7 +37,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                // Not testing comment_author_email or comment_author_url
</span><span class="cx" style="display: block; padding: 0 10px">                // as slashes are not permitted in that data.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $data = array(
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $data       = array(
</ins><span class="cx" style="display: block; padding: 0 10px">                         'comment_post_ID'      => $post_id,
</span><span class="cx" style="display: block; padding: 0 10px">                        'comment_author'       => $this->slash_1,
</span><span class="cx" style="display: block; padding: 0 10px">                        'comment_author_url'   => '',
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -45,14 +45,14 @@
</span><span class="cx" style="display: block; padding: 0 10px">                        'comment_type'         => '',
</span><span class="cx" style="display: block; padding: 0 10px">                        'comment_content'      => $this->slash_7,
</span><span class="cx" style="display: block; padding: 0 10px">                );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $id   = wp_new_comment( $data );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $comment_id = wp_new_comment( $data );
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $comment = get_comment( $id );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $comment = get_comment( $comment_id );
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertSame( wp_unslash( $this->slash_1 ), $comment->comment_author );
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertSame( wp_unslash( $this->slash_7 ), $comment->comment_content );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $data = array(
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $data       = array(
</ins><span class="cx" style="display: block; padding: 0 10px">                         'comment_post_ID'      => $post_id,
</span><span class="cx" style="display: block; padding: 0 10px">                        'comment_author'       => $this->slash_2,
</span><span class="cx" style="display: block; padding: 0 10px">                        'comment_author_url'   => '',
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -60,9 +60,9 @@
</span><span class="cx" style="display: block; padding: 0 10px">                        'comment_type'         => '',
</span><span class="cx" style="display: block; padding: 0 10px">                        'comment_content'      => $this->slash_4,
</span><span class="cx" style="display: block; padding: 0 10px">                );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $id   = wp_new_comment( $data );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $comment_id = wp_new_comment( $data );
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $comment = get_comment( $id );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $comment = get_comment( $comment_id );
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertSame( wp_unslash( $this->slash_2 ), $comment->comment_author );
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertSame( wp_unslash( $this->slash_4 ), $comment->comment_content );
</span></span></pre></div>
<a id="trunktestsphpunittestsmetaslashesphp"></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/slashes.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/meta/slashes.php        2020-09-19 10:34:54 UTC (rev 49003)
+++ trunk/tests/phpunit/tests/meta/slashes.php  2020-09-19 10:53:15 UTC (rev 49004)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -34,20 +34,21 @@
</span><span class="cx" style="display: block; padding: 0 10px">         * Tests the controller function that expects slashed data.
</span><span class="cx" style="display: block; padding: 0 10px">         */
</span><span class="cx" style="display: block; padding: 0 10px">        function test_edit_post() {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $id = self::factory()->post->create();
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $post_id = self::factory()->post->create();
+
</ins><span class="cx" style="display: block; padding: 0 10px">                 if ( function_exists( 'wp_add_post_meta' ) ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                        $meta_1 = wp_add_post_meta( $id, 'slash_test_1', 'foo' );
-                       $meta_2 = wp_add_post_meta( $id, 'slash_test_2', 'foo' );
-                       $meta_3 = wp_add_post_meta( $id, 'slash_test_3', 'foo' );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                 $meta_1 = wp_add_post_meta( $post_id, 'slash_test_1', 'foo' );
+                       $meta_2 = wp_add_post_meta( $post_id, 'slash_test_2', 'foo' );
+                       $meta_3 = wp_add_post_meta( $post_id, 'slash_test_3', 'foo' );
</ins><span class="cx" style="display: block; padding: 0 10px">                 } else {
</span><span class="cx" style="display: block; padding: 0 10px">                        // Expects slashed data.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                        $meta_1 = add_post_meta( $id, 'slash_test_1', addslashes( 'foo' ) );
-                       $meta_2 = add_post_meta( $id, 'slash_test_2', addslashes( 'foo' ) );
-                       $meta_3 = add_post_meta( $id, 'slash_test_3', addslashes( 'foo' ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                 $meta_1 = add_post_meta( $post_id, 'slash_test_1', addslashes( 'foo' ) );
+                       $meta_2 = add_post_meta( $post_id, 'slash_test_2', addslashes( 'foo' ) );
+                       $meta_3 = add_post_meta( $post_id, 'slash_test_3', addslashes( 'foo' ) );
</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">                $_POST                  = array();
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $_POST['post_ID']       = $id;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $_POST['post_ID']       = $post_id;
</ins><span class="cx" style="display: block; padding: 0 10px">                 $_POST['metakeyselect'] = '#NONE#';
</span><span class="cx" style="display: block; padding: 0 10px">                $_POST['metakeyinput']  = 'slash_test_0';
</span><span class="cx" style="display: block; padding: 0 10px">                $_POST['metavalue']     = $this->slash_6;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -69,15 +70,15 @@
</span><span class="cx" style="display: block; padding: 0 10px">                $_POST = add_magic_quotes( $_POST ); // The edit_post() function will strip slashes.
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                edit_post();
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $post = get_post( $id );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $post = get_post( $post_id );
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertSame( $this->slash_6, get_post_meta( $id, 'slash_test_0', true ) );
-               $this->assertSame( $this->slash_1, get_post_meta( $id, 'slash_test_1', true ) );
-               $this->assertSame( $this->slash_3, get_post_meta( $id, 'slash_test_2', true ) );
-               $this->assertSame( $this->slash_4, get_post_meta( $id, 'slash_test_3', true ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertSame( $this->slash_6, get_post_meta( $post_id, 'slash_test_0', true ) );
+               $this->assertSame( $this->slash_1, get_post_meta( $post_id, 'slash_test_1', true ) );
+               $this->assertSame( $this->slash_3, get_post_meta( $post_id, 'slash_test_2', true ) );
+               $this->assertSame( $this->slash_4, get_post_meta( $post_id, 'slash_test_3', true ) );
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $_POST                  = array();
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $_POST['post_ID']       = $id;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $_POST['post_ID']       = $post_id;
</ins><span class="cx" style="display: block; padding: 0 10px">                 $_POST['metakeyselect'] = '#NONE#';
</span><span class="cx" style="display: block; padding: 0 10px">                $_POST['metakeyinput']  = 'slash_test_0';
</span><span class="cx" style="display: block; padding: 0 10px">                $_POST['metavalue']     = $this->slash_7;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -99,11 +100,11 @@
</span><span class="cx" style="display: block; padding: 0 10px">                $_POST = add_magic_quotes( $_POST ); // The edit_post() function will strip slashes.
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                edit_post();
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $post = get_post( $id );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $post = get_post( $post_id );
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertSame( $this->slash_2, get_post_meta( $id, 'slash_test_1', true ) );
-               $this->assertSame( $this->slash_4, get_post_meta( $id, 'slash_test_2', true ) );
-               $this->assertSame( $this->slash_5, get_post_meta( $id, 'slash_test_3', true ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertSame( $this->slash_2, get_post_meta( $post_id, 'slash_test_1', true ) );
+               $this->assertSame( $this->slash_4, get_post_meta( $post_id, 'slash_test_2', true ) );
+               $this->assertSame( $this->slash_5, get_post_meta( $post_id, 'slash_test_3', true ) );
</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">@@ -110,14 +111,15 @@
</span><span class="cx" style="display: block; padding: 0 10px">         * Tests the legacy model function that expects slashed data.
</span><span class="cx" style="display: block; padding: 0 10px">         */
</span><span class="cx" style="display: block; padding: 0 10px">        function test_add_post_meta() {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $id = self::factory()->post->create();
-               add_post_meta( $id, 'slash_test_1', addslashes( $this->slash_1 ) );
-               add_post_meta( $id, 'slash_test_2', addslashes( $this->slash_3 ) );
-               add_post_meta( $id, 'slash_test_3', addslashes( $this->slash_4 ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $post_id = self::factory()->post->create();
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertSame( $this->slash_1, get_post_meta( $id, 'slash_test_1', true ) );
-               $this->assertSame( $this->slash_3, get_post_meta( $id, 'slash_test_2', true ) );
-               $this->assertSame( $this->slash_4, get_post_meta( $id, 'slash_test_3', true ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         add_post_meta( $post_id, 'slash_test_1', addslashes( $this->slash_1 ) );
+               add_post_meta( $post_id, 'slash_test_2', addslashes( $this->slash_3 ) );
+               add_post_meta( $post_id, 'slash_test_3', addslashes( $this->slash_4 ) );
+
+               $this->assertSame( $this->slash_1, get_post_meta( $post_id, 'slash_test_1', true ) );
+               $this->assertSame( $this->slash_3, get_post_meta( $post_id, 'slash_test_2', true ) );
+               $this->assertSame( $this->slash_4, get_post_meta( $post_id, 'slash_test_3', true ) );
</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">@@ -124,14 +126,15 @@
</span><span class="cx" style="display: block; padding: 0 10px">         * Tests the legacy model function that expects slashed data.
</span><span class="cx" style="display: block; padding: 0 10px">         */
</span><span class="cx" style="display: block; padding: 0 10px">        function test_update_post_meta() {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $id = self::factory()->post->create();
-               update_post_meta( $id, 'slash_test_1', addslashes( $this->slash_1 ) );
-               update_post_meta( $id, 'slash_test_2', addslashes( $this->slash_3 ) );
-               update_post_meta( $id, 'slash_test_3', addslashes( $this->slash_4 ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $post_id = self::factory()->post->create();
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertSame( $this->slash_1, get_post_meta( $id, 'slash_test_1', true ) );
-               $this->assertSame( $this->slash_3, get_post_meta( $id, 'slash_test_2', true ) );
-               $this->assertSame( $this->slash_4, get_post_meta( $id, 'slash_test_3', true ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         update_post_meta( $post_id, 'slash_test_1', addslashes( $this->slash_1 ) );
+               update_post_meta( $post_id, 'slash_test_2', addslashes( $this->slash_3 ) );
+               update_post_meta( $post_id, 'slash_test_3', addslashes( $this->slash_4 ) );
+
+               $this->assertSame( $this->slash_1, get_post_meta( $post_id, 'slash_test_1', true ) );
+               $this->assertSame( $this->slash_3, get_post_meta( $post_id, 'slash_test_2', true ) );
+               $this->assertSame( $this->slash_4, get_post_meta( $post_id, 'slash_test_3', true ) );
</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">@@ -138,23 +141,23 @@
</span><span class="cx" style="display: block; padding: 0 10px">         * Tests the model function that expects slashed data.
</span><span class="cx" style="display: block; padding: 0 10px">         */
</span><span class="cx" style="display: block; padding: 0 10px">        function test_add_comment_meta() {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $id = self::$comment_id;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $comment_id = self::$comment_id;
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                add_comment_meta( $id, 'slash_test_1', $this->slash_1 );
-               add_comment_meta( $id, 'slash_test_2', $this->slash_3 );
-               add_comment_meta( $id, 'slash_test_3', $this->slash_5 );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         add_comment_meta( $comment_id, 'slash_test_1', $this->slash_1 );
+               add_comment_meta( $comment_id, 'slash_test_2', $this->slash_3 );
+               add_comment_meta( $comment_id, 'slash_test_3', $this->slash_5 );
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertSame( wp_unslash( $this->slash_1 ), get_comment_meta( $id, 'slash_test_1', true ) );
-               $this->assertSame( wp_unslash( $this->slash_3 ), get_comment_meta( $id, 'slash_test_2', true ) );
-               $this->assertSame( wp_unslash( $this->slash_5 ), get_comment_meta( $id, 'slash_test_3', true ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertSame( wp_unslash( $this->slash_1 ), get_comment_meta( $comment_id, 'slash_test_1', true ) );
+               $this->assertSame( wp_unslash( $this->slash_3 ), get_comment_meta( $comment_id, 'slash_test_2', true ) );
+               $this->assertSame( wp_unslash( $this->slash_5 ), get_comment_meta( $comment_id, 'slash_test_3', true ) );
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                add_comment_meta( $id, 'slash_test_4', $this->slash_2 );
-               add_comment_meta( $id, 'slash_test_5', $this->slash_4 );
-               add_comment_meta( $id, 'slash_test_6', $this->slash_6 );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         add_comment_meta( $comment_id, 'slash_test_4', $this->slash_2 );
+               add_comment_meta( $comment_id, 'slash_test_5', $this->slash_4 );
+               add_comment_meta( $comment_id, 'slash_test_6', $this->slash_6 );
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertSame( wp_unslash( $this->slash_2 ), get_comment_meta( $id, 'slash_test_4', true ) );
-               $this->assertSame( wp_unslash( $this->slash_4 ), get_comment_meta( $id, 'slash_test_5', true ) );
-               $this->assertSame( wp_unslash( $this->slash_6 ), get_comment_meta( $id, 'slash_test_6', true ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertSame( wp_unslash( $this->slash_2 ), get_comment_meta( $comment_id, 'slash_test_4', true ) );
+               $this->assertSame( wp_unslash( $this->slash_4 ), get_comment_meta( $comment_id, 'slash_test_5', true ) );
+               $this->assertSame( wp_unslash( $this->slash_6 ), get_comment_meta( $comment_id, 'slash_test_6', true ) );
</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">@@ -161,27 +164,27 @@
</span><span class="cx" style="display: block; padding: 0 10px">         * Tests the model function that expects slashed data.
</span><span class="cx" style="display: block; padding: 0 10px">         */
</span><span class="cx" style="display: block; padding: 0 10px">        function test_update_comment_meta() {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $id = self::$comment_id;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $comment_id = self::$comment_id;
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                add_comment_meta( $id, 'slash_test_1', 'foo' );
-               add_comment_meta( $id, 'slash_test_2', 'foo' );
-               add_comment_meta( $id, 'slash_test_3', 'foo' );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         add_comment_meta( $comment_id, 'slash_test_1', 'foo' );
+               add_comment_meta( $comment_id, 'slash_test_2', 'foo' );
+               add_comment_meta( $comment_id, 'slash_test_3', 'foo' );
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                update_comment_meta( $id, 'slash_test_1', $this->slash_1 );
-               update_comment_meta( $id, 'slash_test_2', $this->slash_3 );
-               update_comment_meta( $id, 'slash_test_3', $this->slash_5 );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         update_comment_meta( $comment_id, 'slash_test_1', $this->slash_1 );
+               update_comment_meta( $comment_id, 'slash_test_2', $this->slash_3 );
+               update_comment_meta( $comment_id, 'slash_test_3', $this->slash_5 );
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertSame( wp_unslash( $this->slash_1 ), get_comment_meta( $id, 'slash_test_1', true ) );
-               $this->assertSame( wp_unslash( $this->slash_3 ), get_comment_meta( $id, 'slash_test_2', true ) );
-               $this->assertSame( wp_unslash( $this->slash_5 ), get_comment_meta( $id, 'slash_test_3', true ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertSame( wp_unslash( $this->slash_1 ), get_comment_meta( $comment_id, 'slash_test_1', true ) );
+               $this->assertSame( wp_unslash( $this->slash_3 ), get_comment_meta( $comment_id, 'slash_test_2', true ) );
+               $this->assertSame( wp_unslash( $this->slash_5 ), get_comment_meta( $comment_id, 'slash_test_3', true ) );
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                update_comment_meta( $id, 'slash_test_1', $this->slash_2 );
-               update_comment_meta( $id, 'slash_test_2', $this->slash_4 );
-               update_comment_meta( $id, 'slash_test_3', $this->slash_6 );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         update_comment_meta( $comment_id, 'slash_test_1', $this->slash_2 );
+               update_comment_meta( $comment_id, 'slash_test_2', $this->slash_4 );
+               update_comment_meta( $comment_id, 'slash_test_3', $this->slash_6 );
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertSame( wp_unslash( $this->slash_2 ), get_comment_meta( $id, 'slash_test_1', true ) );
-               $this->assertSame( wp_unslash( $this->slash_4 ), get_comment_meta( $id, 'slash_test_2', true ) );
-               $this->assertSame( wp_unslash( $this->slash_6 ), get_comment_meta( $id, 'slash_test_3', true ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertSame( wp_unslash( $this->slash_2 ), get_comment_meta( $comment_id, 'slash_test_1', true ) );
+               $this->assertSame( wp_unslash( $this->slash_4 ), get_comment_meta( $comment_id, 'slash_test_2', true ) );
+               $this->assertSame( wp_unslash( $this->slash_6 ), get_comment_meta( $comment_id, 'slash_test_3', true ) );
</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">@@ -188,23 +191,23 @@
</span><span class="cx" style="display: block; padding: 0 10px">         * Tests the model function that expects slashed data.
</span><span class="cx" style="display: block; padding: 0 10px">         */
</span><span class="cx" style="display: block; padding: 0 10px">        function test_add_user_meta() {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $id = self::factory()->user->create();
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $user_id = self::factory()->user->create();
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                add_user_meta( $id, 'slash_test_1', $this->slash_1 );
-               add_user_meta( $id, 'slash_test_2', $this->slash_3 );
-               add_user_meta( $id, 'slash_test_3', $this->slash_5 );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         add_user_meta( $user_id, 'slash_test_1', $this->slash_1 );
+               add_user_meta( $user_id, 'slash_test_2', $this->slash_3 );
+               add_user_meta( $user_id, 'slash_test_3', $this->slash_5 );
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertSame( wp_unslash( $this->slash_1 ), get_user_meta( $id, 'slash_test_1', true ) );
-               $this->assertSame( wp_unslash( $this->slash_3 ), get_user_meta( $id, 'slash_test_2', true ) );
-               $this->assertSame( wp_unslash( $this->slash_5 ), get_user_meta( $id, 'slash_test_3', true ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertSame( wp_unslash( $this->slash_1 ), get_user_meta( $user_id, 'slash_test_1', true ) );
+               $this->assertSame( wp_unslash( $this->slash_3 ), get_user_meta( $user_id, 'slash_test_2', true ) );
+               $this->assertSame( wp_unslash( $this->slash_5 ), get_user_meta( $user_id, 'slash_test_3', true ) );
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                add_user_meta( $id, 'slash_test_4', $this->slash_2 );
-               add_user_meta( $id, 'slash_test_5', $this->slash_4 );
-               add_user_meta( $id, 'slash_test_6', $this->slash_6 );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         add_user_meta( $user_id, 'slash_test_4', $this->slash_2 );
+               add_user_meta( $user_id, 'slash_test_5', $this->slash_4 );
+               add_user_meta( $user_id, 'slash_test_6', $this->slash_6 );
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertSame( wp_unslash( $this->slash_2 ), get_user_meta( $id, 'slash_test_4', true ) );
-               $this->assertSame( wp_unslash( $this->slash_4 ), get_user_meta( $id, 'slash_test_5', true ) );
-               $this->assertSame( wp_unslash( $this->slash_6 ), get_user_meta( $id, 'slash_test_6', true ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertSame( wp_unslash( $this->slash_2 ), get_user_meta( $user_id, 'slash_test_4', true ) );
+               $this->assertSame( wp_unslash( $this->slash_4 ), get_user_meta( $user_id, 'slash_test_5', true ) );
+               $this->assertSame( wp_unslash( $this->slash_6 ), get_user_meta( $user_id, 'slash_test_6', true ) );
</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">@@ -211,26 +214,26 @@
</span><span class="cx" style="display: block; padding: 0 10px">         * Tests the model function that expects slashed data.
</span><span class="cx" style="display: block; padding: 0 10px">         */
</span><span class="cx" style="display: block; padding: 0 10px">        function test_update_user_meta() {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $id = self::factory()->user->create();
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $user_id = self::factory()->user->create();
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                add_user_meta( $id, 'slash_test_1', 'foo' );
-               add_user_meta( $id, 'slash_test_2', 'foo' );
-               add_user_meta( $id, 'slash_test_3', 'foo' );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         add_user_meta( $user_id, 'slash_test_1', 'foo' );
+               add_user_meta( $user_id, 'slash_test_2', 'foo' );
+               add_user_meta( $user_id, 'slash_test_3', 'foo' );
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                update_user_meta( $id, 'slash_test_1', $this->slash_1 );
-               update_user_meta( $id, 'slash_test_2', $this->slash_3 );
-               update_user_meta( $id, 'slash_test_3', $this->slash_5 );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         update_user_meta( $user_id, 'slash_test_1', $this->slash_1 );
+               update_user_meta( $user_id, 'slash_test_2', $this->slash_3 );
+               update_user_meta( $user_id, 'slash_test_3', $this->slash_5 );
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertSame( wp_unslash( $this->slash_1 ), get_user_meta( $id, 'slash_test_1', true ) );
-               $this->assertSame( wp_unslash( $this->slash_3 ), get_user_meta( $id, 'slash_test_2', true ) );
-               $this->assertSame( wp_unslash( $this->slash_5 ), get_user_meta( $id, 'slash_test_3', true ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertSame( wp_unslash( $this->slash_1 ), get_user_meta( $user_id, 'slash_test_1', true ) );
+               $this->assertSame( wp_unslash( $this->slash_3 ), get_user_meta( $user_id, 'slash_test_2', true ) );
+               $this->assertSame( wp_unslash( $this->slash_5 ), get_user_meta( $user_id, 'slash_test_3', true ) );
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                update_user_meta( $id, 'slash_test_1', $this->slash_2 );
-               update_user_meta( $id, 'slash_test_2', $this->slash_4 );
-               update_user_meta( $id, 'slash_test_3', $this->slash_6 );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         update_user_meta( $user_id, 'slash_test_1', $this->slash_2 );
+               update_user_meta( $user_id, 'slash_test_2', $this->slash_4 );
+               update_user_meta( $user_id, 'slash_test_3', $this->slash_6 );
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertSame( wp_unslash( $this->slash_2 ), get_user_meta( $id, 'slash_test_1', true ) );
-               $this->assertSame( wp_unslash( $this->slash_4 ), get_user_meta( $id, 'slash_test_2', true ) );
-               $this->assertSame( wp_unslash( $this->slash_6 ), get_user_meta( $id, 'slash_test_3', true ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertSame( wp_unslash( $this->slash_2 ), get_user_meta( $user_id, 'slash_test_1', true ) );
+               $this->assertSame( wp_unslash( $this->slash_4 ), get_user_meta( $user_id, 'slash_test_2', true ) );
+               $this->assertSame( wp_unslash( $this->slash_6 ), get_user_meta( $user_id, 'slash_test_3', true ) );
</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="trunktestsphpunittestspostslashesphp"></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/slashes.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/post/slashes.php        2020-09-19 10:34:54 UTC (rev 49003)
+++ trunk/tests/phpunit/tests/post/slashes.php  2020-09-19 10:53:15 UTC (rev 49004)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -32,10 +32,10 @@
</span><span class="cx" style="display: block; padding: 0 10px">         * Tests the controller function that expects slashed data.
</span><span class="cx" style="display: block; padding: 0 10px">         */
</span><span class="cx" style="display: block; padding: 0 10px">        function test_edit_post() {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $id = self::factory()->post->create();
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $post_id = self::factory()->post->create();
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $_POST               = array();
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $_POST['post_ID']    = $id;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $_POST['post_ID']    = $post_id;
</ins><span class="cx" style="display: block; padding: 0 10px">                 $_POST['post_title'] = $this->slash_1;
</span><span class="cx" style="display: block; padding: 0 10px">                $_POST['content']    = $this->slash_5;
</span><span class="cx" style="display: block; padding: 0 10px">                $_POST['excerpt']    = $this->slash_7;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -50,7 +50,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertSame( $this->slash_7, $post->post_excerpt );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $_POST               = array();
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $_POST['post_ID']    = $id;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $_POST['post_ID']    = $post_id;
</ins><span class="cx" style="display: block; padding: 0 10px">                 $_POST['post_title'] = $this->slash_2;
</span><span class="cx" style="display: block; padding: 0 10px">                $_POST['content']    = $this->slash_4;
</span><span class="cx" style="display: block; padding: 0 10px">                $_POST['excerpt']    = $this->slash_6;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -69,7 +69,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">         * Tests the model function that expects slashed data.
</span><span class="cx" style="display: block; padding: 0 10px">         */
</span><span class="cx" style="display: block; padding: 0 10px">        function test_wp_insert_post() {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $id   = wp_insert_post(
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $post_id = wp_insert_post(
</ins><span class="cx" style="display: block; padding: 0 10px">                         array(
</span><span class="cx" style="display: block; padding: 0 10px">                                'post_status'  => 'publish',
</span><span class="cx" style="display: block; padding: 0 10px">                                'post_title'   => $this->slash_1,
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -79,13 +79,13 @@
</span><span class="cx" style="display: block; padding: 0 10px">                                'slashed'      => false,
</span><span class="cx" style="display: block; padding: 0 10px">                        )
</span><span class="cx" style="display: block; padding: 0 10px">                );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $post = get_post( $id );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $post    = get_post( $post_id );
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertSame( wp_unslash( $this->slash_1 ), $post->post_title );
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertSame( wp_unslash( $this->slash_3 ), $post->post_content );
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertSame( wp_unslash( $this->slash_5 ), $post->post_excerpt );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $id   = wp_insert_post(
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $post_id = wp_insert_post(
</ins><span class="cx" style="display: block; padding: 0 10px">                         array(
</span><span class="cx" style="display: block; padding: 0 10px">                                'post_status'  => 'publish',
</span><span class="cx" style="display: block; padding: 0 10px">                                'post_title'   => $this->slash_2,
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -94,7 +94,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                                'post_type'    => 'post',
</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">-                $post = get_post( $id );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $post    = get_post( $post_id );
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertSame( wp_unslash( $this->slash_2 ), $post->post_title );
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertSame( wp_unslash( $this->slash_4 ), $post->post_content );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -105,17 +105,17 @@
</span><span class="cx" style="display: block; padding: 0 10px">         * Tests the model function that expects slashed data.
</span><span class="cx" style="display: block; padding: 0 10px">         */
</span><span class="cx" style="display: block; padding: 0 10px">        function test_wp_update_post() {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $id = self::factory()->post->create();
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $post_id = self::factory()->post->create();
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                wp_update_post(
</span><span class="cx" style="display: block; padding: 0 10px">                        array(
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                'ID'           => $id,
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                         'ID'           => $post_id,
</ins><span class="cx" style="display: block; padding: 0 10px">                                 'post_title'   => $this->slash_1,
</span><span class="cx" style="display: block; padding: 0 10px">                                'post_content' => $this->slash_3,
</span><span class="cx" style="display: block; padding: 0 10px">                                'post_excerpt' => $this->slash_5,
</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">-                $post = get_post( $id );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $post = get_post( $post_id );
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertSame( wp_unslash( $this->slash_1 ), $post->post_title );
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertSame( wp_unslash( $this->slash_3 ), $post->post_content );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -123,13 +123,13 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                wp_update_post(
</span><span class="cx" style="display: block; padding: 0 10px">                        array(
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                'ID'           => $id,
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                         'ID'           => $post_id,
</ins><span class="cx" style="display: block; padding: 0 10px">                                 'post_title'   => $this->slash_2,
</span><span class="cx" style="display: block; padding: 0 10px">                                'post_content' => $this->slash_4,
</span><span class="cx" style="display: block; padding: 0 10px">                                'post_excerpt' => $this->slash_6,
</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">-                $post = get_post( $id );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $post = get_post( $post_id );
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertSame( wp_unslash( $this->slash_2 ), $post->post_title );
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertSame( wp_unslash( $this->slash_4 ), $post->post_content );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -140,26 +140,26 @@
</span><span class="cx" style="display: block; padding: 0 10px">         * @ticket 27550
</span><span class="cx" style="display: block; padding: 0 10px">         */
</span><span class="cx" style="display: block; padding: 0 10px">        function test_wp_trash_untrash() {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $post = array(
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $post    = array(
</ins><span class="cx" style="display: block; padding: 0 10px">                         'post_title'   => $this->slash_1,
</span><span class="cx" style="display: block; padding: 0 10px">                        'post_content' => $this->slash_3,
</span><span class="cx" style="display: block; padding: 0 10px">                        'post_excerpt' => $this->slash_5,
</span><span class="cx" style="display: block; padding: 0 10px">                );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $id   = wp_insert_post( wp_slash( $post ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $post_id = wp_insert_post( wp_slash( $post ) );
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $trashed = wp_trash_post( $id );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $trashed = wp_trash_post( $post_id );
</ins><span class="cx" style="display: block; padding: 0 10px">                 $this->assertNotEmpty( $trashed );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $post = get_post( $id );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $post = get_post( $post_id );
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertSame( $this->slash_1, $post->post_title );
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertSame( $this->slash_3, $post->post_content );
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertSame( $this->slash_5, $post->post_excerpt );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $untrashed = wp_untrash_post( $id );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $untrashed = wp_untrash_post( $post_id );
</ins><span class="cx" style="display: block; padding: 0 10px">                 $this->assertNotEmpty( $untrashed );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $post = get_post( $id );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $post = get_post( $post_id );
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertSame( $this->slash_1, $post->post_title );
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertSame( $this->slash_3, $post->post_content );
</span></span></pre></div>
<a id="trunktestsphpunitteststermslashesphp"></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/slashes.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/term/slashes.php        2020-09-19 10:34:54 UTC (rev 49003)
+++ trunk/tests/phpunit/tests/term/slashes.php  2020-09-19 10:53:15 UTC (rev 49004)
</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">                        'post_tag',
</span><span class="cx" style="display: block; padding: 0 10px">                );
</span><span class="cx" style="display: block; padding: 0 10px">                foreach ( $taxonomies as $taxonomy ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                        $id = self::factory()->term->create(
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                 $term_id = self::factory()->term->create(
</ins><span class="cx" style="display: block; padding: 0 10px">                                 array(
</span><span class="cx" style="display: block; padding: 0 10px">                                        'taxonomy' => $taxonomy,
</span><span class="cx" style="display: block; padding: 0 10px">                                )
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -89,7 +89,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">                        $update = wp_update_term(
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                $id,
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                         $term_id,
</ins><span class="cx" style="display: block; padding: 0 10px">                                 $taxonomy,
</span><span class="cx" style="display: block; padding: 0 10px">                                array(
</span><span class="cx" style="display: block; padding: 0 10px">                                        'name'        => $this->slash_1,
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -97,12 +97,12 @@
</span><span class="cx" style="display: block; padding: 0 10px">                                )
</span><span class="cx" style="display: block; padding: 0 10px">                        );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                        $term = get_term( $id, $taxonomy );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                 $term = get_term( $term_id, $taxonomy );
</ins><span class="cx" style="display: block; padding: 0 10px">                         $this->assertSame( wp_unslash( $this->slash_1 ), $term->name );
</span><span class="cx" style="display: block; padding: 0 10px">                        $this->assertSame( wp_unslash( $this->slash_3 ), $term->description );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                        $update = wp_update_term(
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                $id,
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                         $term_id,
</ins><span class="cx" style="display: block; padding: 0 10px">                                 $taxonomy,
</span><span class="cx" style="display: block; padding: 0 10px">                                array(
</span><span class="cx" style="display: block; padding: 0 10px">                                        'name'        => $this->slash_3,
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -109,12 +109,12 @@
</span><span class="cx" style="display: block; padding: 0 10px">                                        'description' => $this->slash_5,
</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">-                        $term   = get_term( $id, $taxonomy );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                 $term   = get_term( $term_id, $taxonomy );
</ins><span class="cx" style="display: block; padding: 0 10px">                         $this->assertSame( wp_unslash( $this->slash_3 ), $term->name );
</span><span class="cx" style="display: block; padding: 0 10px">                        $this->assertSame( wp_unslash( $this->slash_5 ), $term->description );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                        $update = wp_update_term(
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                $id,
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                         $term_id,
</ins><span class="cx" style="display: block; padding: 0 10px">                                 $taxonomy,
</span><span class="cx" style="display: block; padding: 0 10px">                                array(
</span><span class="cx" style="display: block; padding: 0 10px">                                        'name'        => $this->slash_2,
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -121,7 +121,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                                        'description' => $this->slash_4,
</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">-                        $term   = get_term( $id, $taxonomy );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                 $term   = get_term( $term_id, $taxonomy );
</ins><span class="cx" style="display: block; padding: 0 10px">                         $this->assertSame( wp_unslash( $this->slash_2 ), $term->name );
</span><span class="cx" style="display: block; padding: 0 10px">                        $this->assertSame( wp_unslash( $this->slash_4 ), $term->description );
</span><span class="cx" style="display: block; padding: 0 10px">                }
</span></span></pre></div>
<a id="trunktestsphpunittestsuserslashesphp"></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/slashes.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/user/slashes.php        2020-09-19 10:34:54 UTC (rev 49003)
+++ trunk/tests/phpunit/tests/user/slashes.php  2020-09-19 10:53:15 UTC (rev 49004)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -48,8 +48,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $_POST = add_magic_quotes( $_POST ); // The add_user() function will strip slashes.
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $id   = add_user();
-               $user = get_user_to_edit( $id );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $user_id = add_user();
+               $user    = get_user_to_edit( $user_id );
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertSame( $this->slash_1, $user->first_name );
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertSame( $this->slash_3, $user->last_name );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -73,8 +73,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $_POST = add_magic_quotes( $_POST ); // The add_user() function will strip slashes.
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $id   = add_user();
-               $user = get_user_to_edit( $id );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $user_id = add_user();
+               $user    = get_user_to_edit( $user_id );
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertSame( $this->slash_2, $user->first_name );
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertSame( $this->slash_4, $user->last_name );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -87,7 +87,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">         * Tests the controller function that expects slashed data.
</span><span class="cx" style="display: block; padding: 0 10px">         */
</span><span class="cx" style="display: block; padding: 0 10px">        function test_edit_user() {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $id = self::factory()->user->create();
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $user_id = self::factory()->user->create();
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $_POST                 = array();
</span><span class="cx" style="display: block; padding: 0 10px">                $_GET                  = array();
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -102,8 +102,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $_POST = add_magic_quotes( $_POST ); // The edit_user() function will strip slashes.
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $id   = edit_user( $id );
-               $user = get_user_to_edit( $id );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $user_id = edit_user( $user_id );
+               $user    = get_user_to_edit( $user_id );
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertSame( $this->slash_1, $user->first_name );
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertSame( $this->slash_3, $user->last_name );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -124,8 +124,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $_POST = add_magic_quotes( $_POST ); // The edit_user() function will strip slashes.
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $id   = edit_user( $id );
-               $user = get_user_to_edit( $id );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $user_id = edit_user( $user_id );
+               $user    = get_user_to_edit( $user_id );
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertSame( $this->slash_2, $user->first_name );
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertSame( $this->slash_4, $user->last_name );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -138,7 +138,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">         * Tests the model function that expects slashed data.
</span><span class="cx" style="display: block; padding: 0 10px">         */
</span><span class="cx" style="display: block; padding: 0 10px">        function test_wp_insert_user() {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $id   = wp_insert_user(
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $user_id = wp_insert_user(
</ins><span class="cx" style="display: block; padding: 0 10px">                         array(
</span><span class="cx" style="display: block; padding: 0 10px">                                'user_login'   => 'slash_example_user_3',
</span><span class="cx" style="display: block; padding: 0 10px">                                'role'         => 'subscriber',
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -151,7 +151,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                                'user_pass'    => '',
</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">-                $user = get_user_to_edit( $id );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $user    = get_user_to_edit( $user_id );
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertSame( wp_unslash( $this->slash_1 ), $user->first_name );
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertSame( wp_unslash( $this->slash_3 ), $user->last_name );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -159,7 +159,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertSame( wp_unslash( $this->slash_7 ), $user->display_name );
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertSame( wp_unslash( $this->slash_3 ), $user->description );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $id   = wp_insert_user(
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $user_id = wp_insert_user(
</ins><span class="cx" style="display: block; padding: 0 10px">                         array(
</span><span class="cx" style="display: block; padding: 0 10px">                                'user_login'   => 'slash_example_user_4',
</span><span class="cx" style="display: block; padding: 0 10px">                                'role'         => 'subscriber',
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -172,7 +172,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                                'user_pass'    => '',
</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">-                $user = get_user_to_edit( $id );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $user    = get_user_to_edit( $user_id );
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertSame( wp_unslash( $this->slash_2 ), $user->first_name );
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertSame( wp_unslash( $this->slash_4 ), $user->last_name );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -185,10 +185,10 @@
</span><span class="cx" style="display: block; padding: 0 10px">         * Tests the model function that expects slashed data.
</span><span class="cx" style="display: block; padding: 0 10px">         */
</span><span class="cx" style="display: block; padding: 0 10px">        function test_wp_update_user() {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $id   = self::factory()->user->create();
-               $id   = wp_update_user(
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $user_id = self::factory()->user->create();
+               $user_id = wp_update_user(
</ins><span class="cx" style="display: block; padding: 0 10px">                         array(
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                'ID'           => $id,
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                         'ID'           => $user_id,
</ins><span class="cx" style="display: block; padding: 0 10px">                                 'role'         => 'subscriber',
</span><span class="cx" style="display: block; padding: 0 10px">                                'first_name'   => $this->slash_1,
</span><span class="cx" style="display: block; padding: 0 10px">                                'last_name'    => $this->slash_3,
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -197,7 +197,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                                'description'  => $this->slash_3,
</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">-                $user = get_user_to_edit( $id );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $user    = get_user_to_edit( $user_id );
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertSame( wp_unslash( $this->slash_1 ), $user->first_name );
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertSame( wp_unslash( $this->slash_3 ), $user->last_name );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -205,9 +205,9 @@
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertSame( wp_unslash( $this->slash_7 ), $user->display_name );
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertSame( wp_unslash( $this->slash_3 ), $user->description );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $id   = wp_update_user(
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $user_id = wp_update_user(
</ins><span class="cx" style="display: block; padding: 0 10px">                         array(
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                'ID'           => $id,
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                         'ID'           => $user_id,
</ins><span class="cx" style="display: block; padding: 0 10px">                                 'role'         => 'subscriber',
</span><span class="cx" style="display: block; padding: 0 10px">                                'first_name'   => $this->slash_2,
</span><span class="cx" style="display: block; padding: 0 10px">                                'last_name'    => $this->slash_4,
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -216,7 +216,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                                'description'  => $this->slash_4,
</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">-                $user = get_user_to_edit( $id );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $user    = get_user_to_edit( $user_id );
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertSame( wp_unslash( $this->slash_2 ), $user->first_name );
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertSame( wp_unslash( $this->slash_4 ), $user->last_name );
</span></span></pre>
</div>
</div>

</body>
</html>