<!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>[46612] trunk/tests/phpunit: Build/Test Tools: Ignore EOL differences in tests using multiline string assertions.</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/46612">46612</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/46612","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>2019-10-29 14:26:41 +0000 (Tue, 29 Oct 2019)</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'>Build/Test Tools: Ignore EOL differences in tests using multiline string assertions.
Unix vs. Windows EOL style mismatches can cause misleading failures in tests using the heredoc syntax (`<<<`) or multiline strings as the expected result.
Fixes <a href="https://core.trac.wordpress.org/ticket/31432">#31432</a>. See <a href="https://core.trac.wordpress.org/ticket/42594">#42594</a>, <a href="https://core.trac.wordpress.org/ticket/47411">#47411</a>.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunktestsphpunitincludesabstracttestcasephp">trunk/tests/phpunit/includes/abstract-testcase.php</a></li>
<li><a href="#trunktestsphpunittestsblocksrenderphp">trunk/tests/phpunit/tests/blocks/render.php</a></li>
<li><a href="#trunktestsphpunittestsdependenciesscriptsphp">trunk/tests/phpunit/tests/dependencies/scripts.php</a></li>
<li><a href="#trunktestsphpunittestsdependenciesstylesphp">trunk/tests/phpunit/tests/dependencies/styles.php</a></li>
<li><a href="#trunktestsphpunittestsformattingAutopphp">trunk/tests/phpunit/tests/formatting/Autop.php</a></li>
<li><a href="#trunktestsphpunittestsformattingEscUrlphp">trunk/tests/phpunit/tests/formatting/EscUrl.php</a></li>
<li><a href="#trunktestsphpunittestsformattingSanitizeTextFieldphp">trunk/tests/phpunit/tests/formatting/SanitizeTextField.php</a></li>
<li><a href="#trunktestsphpunittestsfunctionsgetArchivesphp">trunk/tests/phpunit/tests/functions/getArchives.php</a></li>
<li><a href="#trunktestsphpunittestsgeneralpaginateLinksphp">trunk/tests/phpunit/tests/general/paginateLinks.php</a></li>
<li><a href="#trunktestsphpunittestsmediaphp">trunk/tests/phpunit/tests/media.php</a></li>
<li><a href="#trunktestsphpunittestspomopophp">trunk/tests/phpunit/tests/pomo/po.php</a></li>
<li><a href="#trunktestsphpunittestspostlistPagesphp">trunk/tests/phpunit/tests/post/listPages.php</a></li>
<li><a href="#trunktestsphpunittestsposttemplatephp">trunk/tests/phpunit/tests/post/template.php</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunktestsphpunitincludesabstracttestcasephp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/includes/abstract-testcase.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/includes/abstract-testcase.php 2019-10-29 09:57:37 UTC (rev 46611)
+++ trunk/tests/phpunit/includes/abstract-testcase.php 2019-10-29 14:26:41 UTC (rev 46612)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -636,6 +636,18 @@
</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><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Asserts that two values are equal, with EOL differences discarded.
+ *
+ * @since 5.4.0
+ *
+ * @param string $expected The expected value.
+ * @param string $actual The actual value.
+ */
+ public function assertEqualsIgnoreEOL( $expected, $actual ) {
+ $this->assertEquals( str_replace( "\r\n", "\n", $expected ), str_replace( "\r\n", "\n", $actual ) );
+ }
+
+ /**
</ins><span class="cx" style="display: block; padding: 0 10px"> * Asserts that the contents of two un-keyed, single arrays are equal, without accounting for the order of elements.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 3.5.0
</span></span></pre></div>
<a id="trunktestsphpunittestsblocksrenderphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/tests/blocks/render.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/blocks/render.php 2019-10-29 09:57:37 UTC (rev 46611)
+++ trunk/tests/phpunit/tests/blocks/render.php 2019-10-29 14:26:41 UTC (rev 46612)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -60,7 +60,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $actual_html = do_blocks( $original_html );
</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->assertEquals( $expected_html, $actual_html );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertEqualsIgnoreEOL( $expected_html, $actual_html );
</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="trunktestsphpunittestsdependenciesscriptsphp"></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/dependencies/scripts.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/dependencies/scripts.php 2019-10-29 09:57:37 UTC (rev 46611)
+++ trunk/tests/phpunit/tests/dependencies/scripts.php 2019-10-29 14:26:41 UTC (rev 46612)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -846,7 +846,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> );
</span><span class="cx" style="display: block; padding: 0 10px"> $expected .= "<script type='text/javascript' src='/wp-includes/js/script.js'></script>\n";
</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->assertEquals( $expected, get_echo( 'wp_print_scripts' ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertEqualsIgnoreEOL( $expected, get_echo( 'wp_print_scripts' ) );
</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">@@ -871,7 +871,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> );
</span><span class="cx" style="display: block; padding: 0 10px"> $expected .= "<script type='text/javascript' src='/wp-content/plugins/my-plugin/js/script.js'></script>\n";
</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->assertEquals( $expected, get_echo( 'wp_print_scripts' ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertEqualsIgnoreEOL( $expected, get_echo( 'wp_print_scripts' ) );
</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">@@ -896,7 +896,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> );
</span><span class="cx" style="display: block; padding: 0 10px"> $expected .= "<script type='text/javascript' src='/wp-content/themes/my-theme/js/script.js'></script>\n";
</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->assertEquals( $expected, get_echo( 'wp_print_scripts' ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertEqualsIgnoreEOL( $expected, get_echo( 'wp_print_scripts' ) );
</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">@@ -921,7 +921,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> );
</span><span class="cx" style="display: block; padding: 0 10px"> $expected .= "<script type='text/javascript' src='/wp-admin/js/script.js'></script>\n";
</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->assertEquals( $expected, get_echo( 'wp_print_scripts' ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertEqualsIgnoreEOL( $expected, get_echo( 'wp_print_scripts' ) );
</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">@@ -961,7 +961,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> );
</span><span class="cx" style="display: block; padding: 0 10px"> $expected .= "<script type='text/javascript' src='/wp-admin/js/script.js'></script>\n";
</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->assertEquals( $expected, get_echo( 'wp_print_scripts' ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertEqualsIgnoreEOL( $expected, get_echo( 'wp_print_scripts' ) );
</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">@@ -988,7 +988,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> );
</span><span class="cx" style="display: block; padding: 0 10px"> $expected .= "<script type='text/javascript' src='/wp-includes/js/script.js'></script>\n";
</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->assertEquals( $expected, get_echo( 'wp_print_scripts' ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertEqualsIgnoreEOL( $expected, get_echo( 'wp_print_scripts' ) );
</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">@@ -1016,7 +1016,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $expected .= "<script type='text/javascript' src='/wp-includes/js/script.js'></script>\n";
</span><span class="cx" style="display: block; padding: 0 10px"> $expected .= "<script type='text/javascript' src='/wp-includes/js/script2.js'></script>\n";
</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->assertEquals( $expected, get_echo( 'wp_print_scripts' ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertEqualsIgnoreEOL( $expected, get_echo( 'wp_print_scripts' ) );
</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="trunktestsphpunittestsdependenciesstylesphp"></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/dependencies/styles.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/dependencies/styles.php 2019-10-29 09:57:37 UTC (rev 46611)
+++ trunk/tests/phpunit/tests/dependencies/styles.php 2019-10-29 14:26:41 UTC (rev 46612)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -272,7 +272,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> wp_style_add_data( 'handle', 'conditional', 'IE' );
</span><span class="cx" style="display: block; padding: 0 10px"> wp_add_inline_style( 'handle', 'a { color: blue; }' );
</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->assertEquals( $expected, get_echo( 'wp_print_styles' ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertEqualsIgnoreEOL( $expected, get_echo( 'wp_print_styles' ) );
</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="trunktestsphpunittestsformattingAutopphp"></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/Autop.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/formatting/Autop.php 2019-10-29 09:57:37 UTC (rev 46611)
+++ trunk/tests/phpunit/tests/formatting/Autop.php 2019-10-29 14:26:41 UTC (rev 46612)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -502,7 +502,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> line 4<br />
</span><span class="cx" style="display: block; padding: 0 10px"> line 5</p>';
</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->assertEquals( $expected, trim( wpautop( $content ) ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertEqualsIgnoreEOL( $expected, trim( wpautop( $content ) ) );
</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">@@ -521,7 +521,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $expected = '<p>line 1</p>
</span><span class="cx" style="display: block; padding: 0 10px"> <p>line 2</p>';
</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->assertEquals( $expected, trim( wpautop( $content ) ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertEqualsIgnoreEOL( $expected, trim( wpautop( $content ) ) );
</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">@@ -543,7 +543,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @ticket 39307
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- function test_that_wpautop_doses_not_add_extra_closing_p_in_figure() {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ function test_that_wpautop_does_not_add_extra_closing_p_in_figure() {
</ins><span class="cx" style="display: block; padding: 0 10px"> $content1 = '<figure><img src="example.jpg" /><figcaption>Caption</figcaption></figure>';
</span><span class="cx" style="display: block; padding: 0 10px"> $expected1 = $content1;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -556,7 +556,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> <img src="example.jpg" /><figcaption>Caption</figcaption></figure>';
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertEquals( $expected1, trim( wpautop( $content1 ) ) );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertEquals( $expected2, trim( wpautop( $content2 ) ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertEqualsIgnoreEOL( $expected2, trim( wpautop( $content2 ) ) );
</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">@@ -584,7 +584,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $expected = '<p>' . $content . '</p>';
</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->assertEquals( $expected, trim( wpautop( $content ) ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertEqualsIgnoreEOL( $expected, trim( wpautop( $content ) ) );
</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">@@ -600,6 +600,6 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $expected = '<p>' . $content . '</p>';
</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->assertEquals( $expected, trim( wpautop( $content ) ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertEqualsIgnoreEOL( $expected, trim( wpautop( $content ) ) );
</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="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 2019-10-29 09:57:37 UTC (rev 46611)
+++ trunk/tests/phpunit/tests/formatting/EscUrl.php 2019-10-29 14:26:41 UTC (rev 46612)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -209,6 +209,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> I thought you might want to sign up for this newsletter
</span><span class="cx" style="display: block; padding: 0 10px"> EOT;
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $body = str_replace( "\r\n", "\n", $body );
</ins><span class="cx" style="display: block; padding: 0 10px"> $email_link = 'mailto:?body=' . rawurlencode( $body );
</span><span class="cx" style="display: block; padding: 0 10px"> $email_link = esc_url( $email_link );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertEquals( 'mailto:?body=Hi%20there%2C%0A%0AI%20thought%20you%20might%20want%20to%20sign%20up%20for%20this%20newsletter', $email_link );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -223,6 +224,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> I thought you might want to sign up for this newsletter
</span><span class="cx" style="display: block; padding: 0 10px"> EOT;
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $body = str_replace( "\r\n", "\n", $body );
</ins><span class="cx" style="display: block; padding: 0 10px"> $email_link = 'http://example.com/mailto:?body=' . rawurlencode( $body );
</span><span class="cx" style="display: block; padding: 0 10px"> $email_link = esc_url( $email_link );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertEquals( 'http://example.com/mailto:?body=Hi%20there%2CI%20thought%20you%20might%20want%20to%20sign%20up%20for%20this%20newsletter', $email_link );
</span></span></pre></div>
<a id="trunktestsphpunittestsformattingSanitizeTextFieldphp"></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/SanitizeTextField.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/formatting/SanitizeTextField.php 2019-10-29 09:57:37 UTC (rev 46611)
+++ trunk/tests/phpunit/tests/formatting/SanitizeTextField.php 2019-10-29 14:26:41 UTC (rev 46612)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -137,7 +137,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $expected_multiline = $expected;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertEquals( $expected_oneline, sanitize_text_field( $string ) );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertEquals( $expected_multiline, sanitize_textarea_field( $string ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertEqualsIgnoreEOL( $expected_multiline, sanitize_textarea_field( $string ) );
</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="trunktestsphpunittestsfunctionsgetArchivesphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/tests/functions/getArchives.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/functions/getArchives.php 2019-10-29 09:57:37 UTC (rev 46611)
+++ trunk/tests/phpunit/tests/functions/getArchives.php 2019-10-29 14:26:41 UTC (rev 46612)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -71,7 +71,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> <li><a href='$link4'>$title4</a></li>
</span><span class="cx" style="display: block; padding: 0 10px"> <li><a href='$link5'>$title5</a></li>
</span><span class="cx" style="display: block; padding: 0 10px"> EOF;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertEquals(
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertEqualsIgnoreEOL(
</ins><span class="cx" style="display: block; padding: 0 10px"> $expected['limit'],
</span><span class="cx" style="display: block; padding: 0 10px"> trim(
</span><span class="cx" style="display: block; padding: 0 10px"> wp_get_archives(
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -153,7 +153,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> <li><a href='{$oct_url}'>October 2012</a></li>
</span><span class="cx" style="display: block; padding: 0 10px"> <li><a href='{$this->month_url}'>$date_full</a></li>
</span><span class="cx" style="display: block; padding: 0 10px"> EOF;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertEquals(
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertEqualsIgnoreEOL(
</ins><span class="cx" style="display: block; padding: 0 10px"> $expected['order_asc'],
</span><span class="cx" style="display: block; padding: 0 10px"> trim(
</span><span class="cx" style="display: block; padding: 0 10px"> wp_get_archives(
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -169,7 +169,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> <li><a href='{$this->month_url}'>$date_full</a></li>
</span><span class="cx" style="display: block; padding: 0 10px"> <li><a href='{$oct_url}'>October 2012</a></li>
</span><span class="cx" style="display: block; padding: 0 10px"> EOF;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertEquals(
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertEqualsIgnoreEOL(
</ins><span class="cx" style="display: block; padding: 0 10px"> $expected['order_desc'],
</span><span class="cx" style="display: block; padding: 0 10px"> trim(
</span><span class="cx" style="display: block; padding: 0 10px"> wp_get_archives(
</span></span></pre></div>
<a id="trunktestsphpunittestsgeneralpaginateLinksphp"></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/general/paginateLinks.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/general/paginateLinks.php 2019-10-29 09:57:37 UTC (rev 46611)
+++ trunk/tests/phpunit/tests/general/paginateLinks.php 2019-10-29 14:26:41 UTC (rev 46612)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -25,7 +25,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> EXPECTED;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $links = paginate_links( array( 'total' => 50 ) );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertEquals( $expected, $links );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertEqualsIgnoreEOL( $expected, $links );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> function test_format() {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -48,7 +48,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 'format' => 'page/%#%/',
</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->assertEquals( $expected, $links );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertEqualsIgnoreEOL( $expected, $links );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> function test_prev_next_false() {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -73,7 +73,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 'current' => 2,
</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->assertEquals( $expected, $links );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertEqualsIgnoreEOL( $expected, $links );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> function test_prev_next_true() {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -100,7 +100,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 'current' => 2,
</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->assertEquals( $expected, $links );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertEqualsIgnoreEOL( $expected, $links );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> function increment_i18n_count() {
</span></span></pre></div>
<a id="trunktestsphpunittestsmediaphp"></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/media.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/media.php 2019-10-29 09:57:37 UTC (rev 46611)
+++ trunk/tests/phpunit/tests/media.php 2019-10-29 14:26:41 UTC (rev 46612)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1249,7 +1249,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> EOF;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $result = apply_filters( 'the_content', $content );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertEquals( $expected, $result );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertEqualsIgnoreEOL( $expected, $result );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span></span></pre></div>
<a id="trunktestsphpunittestspomopophp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/tests/pomo/po.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/pomo/po.php 2019-10-29 09:57:37 UTC (rev 46611)
+++ trunk/tests/phpunit/tests/pomo/po.php 2019-10-29 14:26:41 UTC (rev 46612)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -22,6 +22,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> --The WordPress Team
</span><span class="cx" style="display: block; padding: 0 10px"> http://wordpress.org/
</span><span class="cx" style="display: block; padding: 0 10px"> ';
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->mail = str_replace( "\r\n", "\n", $this->mail );
</ins><span class="cx" style="display: block; padding: 0 10px"> $this->po_mail = '""
</span><span class="cx" style="display: block; padding: 0 10px"> "Your new WordPress blog has been successfully set up at:\n"
</span><span class="cx" style="display: block; padding: 0 10px"> "\n"
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -63,7 +64,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $src = 'Categories can be selectively converted to tags using the <a href="%s">category to tag converter</a>.';
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertEquals( '"Categories can be selectively converted to tags using the <a href=\\"%s\\">category to tag converter</a>."', $po->poify( $src ) );
</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->assertEquals( $this->po_mail, $po->poify( $this->mail ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertEqualsIgnoreEOL( $this->po_mail, $po->poify( $this->mail ) );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> function test_unpoify() {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -74,7 +75,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertEquals( '\\t\\n', $po->unpoify( '"\\\\t\\\\n"' ) );
</span><span class="cx" style="display: block; padding: 0 10px"> // wordwrapped
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertEquals( 'babadyado', $po->unpoify( "\"\"\n\"baba\"\n\"dyado\"" ) );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertEquals( $this->mail, $po->unpoify( $this->po_mail ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertEqualsIgnoreEOL( $this->mail, $po->unpoify( $this->po_mail ) );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> function test_export_entry() {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -88,7 +89,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 'plural' => 'babas',
</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->assertEquals(
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertEqualsIgnoreEOL(
</ins><span class="cx" style="display: block; padding: 0 10px"> 'msgid "baba"
</span><span class="cx" style="display: block; padding: 0 10px"> msgid_plural "babas"
</span><span class="cx" style="display: block; padding: 0 10px"> msgstr[0] ""
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -101,7 +102,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 'translator_comments' => "baba\ndyado",
</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->assertEquals(
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertEqualsIgnoreEOL(
</ins><span class="cx" style="display: block; padding: 0 10px"> '# baba
</span><span class="cx" style="display: block; padding: 0 10px"> # dyado
</span><span class="cx" style="display: block; padding: 0 10px"> msgid "baba"
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -114,7 +115,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 'extracted_comments' => 'baba',
</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->assertEquals(
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertEqualsIgnoreEOL(
</ins><span class="cx" style="display: block; padding: 0 10px"> '#. baba
</span><span class="cx" style="display: block; padding: 0 10px"> msgid "baba"
</span><span class="cx" style="display: block; padding: 0 10px"> msgstr ""',
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -127,7 +128,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 'references' => range( 1, 29 ),
</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->assertEquals(
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertEqualsIgnoreEOL(
</ins><span class="cx" style="display: block; padding: 0 10px"> '#. baba
</span><span class="cx" style="display: block; padding: 0 10px"> #: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
</span><span class="cx" style="display: block; padding: 0 10px"> #: 29
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -158,7 +159,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 'translations' => array( 'кукубуку' ),
</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->assertEquals(
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertEqualsIgnoreEOL(
</ins><span class="cx" style="display: block; padding: 0 10px"> 'msgid "baba"
</span><span class="cx" style="display: block; padding: 0 10px"> msgid_plural "babas"
</span><span class="cx" style="display: block; padding: 0 10px"> msgstr[0] "кукубуку"',
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -172,7 +173,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 'translations' => array( 'кукубуку', 'кукуруку', 'бабаяга' ),
</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->assertEquals(
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertEqualsIgnoreEOL(
</ins><span class="cx" style="display: block; padding: 0 10px"> 'msgid "baba"
</span><span class="cx" style="display: block; padding: 0 10px"> msgid_plural "babas"
</span><span class="cx" style="display: block; padding: 0 10px"> msgstr[0] "кукубуку"
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -190,7 +191,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 'flags' => array( 'fuzzy', 'php-format' ),
</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->assertEquals(
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertEqualsIgnoreEOL(
</ins><span class="cx" style="display: block; padding: 0 10px"> '#, fuzzy, php-format
</span><span class="cx" style="display: block; padding: 0 10px"> msgctxt "ctxt"
</span><span class="cx" style="display: block; padding: 0 10px"> msgid "baba"
</span></span></pre></div>
<a id="trunktestsphpunittestspostlistPagesphp"></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/listPages.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/post/listPages.php 2019-10-29 09:57:37 UTC (rev 46611)
+++ trunk/tests/phpunit/tests/post/listPages.php 2019-10-29 14:26:41 UTC (rev 46612)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -134,7 +134,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> </li>
</span><span class="cx" style="display: block; padding: 0 10px"> </ul></li>';
</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->AssertEquals( $expected, wp_list_pages( $args ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertEqualsIgnoreEOL( $expected, wp_list_pages( $args ) );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> function test_wp_list_pages_depth() {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -148,7 +148,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> <li class="page_item page-item-' . self::$parent_3 . ' page_item_has_children"><a href="' . get_permalink( self::$parent_3 ) . '">Parent 3</a></li>
</span><span class="cx" style="display: block; padding: 0 10px"> </ul></li>';
</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->AssertEquals( $expected, wp_list_pages( $args ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertEqualsIgnoreEOL( $expected, wp_list_pages( $args ) );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> function test_wp_list_pages_show_date() {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -164,7 +164,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> <li class="page_item page-item-' . self::$parent_3 . ' page_item_has_children"><a href="' . get_permalink( self::$parent_3 ) . '">Parent 3</a> ' . $date . '</li>
</span><span class="cx" style="display: block; padding: 0 10px"> </ul></li>';
</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->AssertEquals( $expected, wp_list_pages( $args ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertEqualsIgnoreEOL( $expected, wp_list_pages( $args ) );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> function test_wp_list_pages_date_format() {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -198,7 +198,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> </li>
</span><span class="cx" style="display: block; padding: 0 10px"> </ul></li>';
</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->AssertEquals( $expected, wp_list_pages( $args ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertEqualsIgnoreEOL( $expected, wp_list_pages( $args ) );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> function test_wp_list_pages_child_of() {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -212,7 +212,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> <li class="page_item page-item-' . self::$children[ self::$parent_2 ][2] . '"><a href="' . get_permalink( self::$children[ self::$parent_2 ][2] ) . '">Child 3</a></li>
</span><span class="cx" style="display: block; padding: 0 10px"> </ul></li>';
</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->AssertEquals( $expected, wp_list_pages( $args ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertEqualsIgnoreEOL( $expected, wp_list_pages( $args ) );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> function test_wp_list_pages_exclude() {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -240,7 +240,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> <li class="page_item page-item-' . self::$children[ self::$parent_2 ][2] . '"><a href="' . get_permalink( self::$children[ self::$parent_2 ][2] ) . '">Child 3</a></li>
</span><span class="cx" style="display: block; padding: 0 10px"> </ul></li>';
</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->AssertEquals( $expected, wp_list_pages( $args ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertEqualsIgnoreEOL( $expected, wp_list_pages( $args ) );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> function test_wp_list_pages_title_li() {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -255,7 +255,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> <li class="page_item page-item-' . self::$parent_3 . ' page_item_has_children"><a href="' . get_permalink( self::$parent_3 ) . '">Parent 3</a></li>
</span><span class="cx" style="display: block; padding: 0 10px"> </ul></li>';
</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->AssertEquals( $expected, wp_list_pages( $args ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertEqualsIgnoreEOL( $expected, wp_list_pages( $args ) );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> function test_wp_list_pages_echo() {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -268,6 +268,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> <li class="page_item page-item-' . self::$parent_2 . ' page_item_has_children"><a href="' . get_permalink( self::$parent_2 ) . '">Parent 2</a></li>
</span><span class="cx" style="display: block; padding: 0 10px"> <li class="page_item page-item-' . self::$parent_3 . ' page_item_has_children"><a href="' . get_permalink( self::$parent_3 ) . '">Parent 3</a></li>
</span><span class="cx" style="display: block; padding: 0 10px"> </ul></li>';
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $expected = str_replace( "\r\n", "\n", $expected );
</ins><span class="cx" style="display: block; padding: 0 10px"> $this->expectOutputString( $expected );
</span><span class="cx" style="display: block; padding: 0 10px"> wp_list_pages( $args );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -281,7 +282,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $expected = '<li class="pagenav">Pages<ul><li class="page_item page-item-' . self::$parent_3 . '"><a href="' . get_permalink( self::$parent_3 ) . '">Parent 3</a></li>
</span><span class="cx" style="display: block; padding: 0 10px"> </ul></li>';
</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->AssertEquals( $expected, wp_list_pages( $args ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertEqualsIgnoreEOL( $expected, wp_list_pages( $args ) );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> function test_wp_list_pages_number() {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -293,7 +294,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $expected = '<li class="pagenav">Pages<ul><li class="page_item page-item-' . self::$children[ self::$parent_1 ][0] . '"><a href="' . get_permalink( self::$children[ self::$parent_1 ][0] ) . '">Child 1</a></li>
</span><span class="cx" style="display: block; padding: 0 10px"> </ul></li>';
</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->AssertEquals( $expected, wp_list_pages( $args ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertEqualsIgnoreEOL( $expected, wp_list_pages( $args ) );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> function test_wp_list_pages_sort_column() {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -326,7 +327,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> </li>
</span><span class="cx" style="display: block; padding: 0 10px"> </ul></li>';
</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->AssertEquals( $expected, wp_list_pages( $args ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertEqualsIgnoreEOL( $expected, wp_list_pages( $args ) );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> function test_wp_list_pages_link_before() {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -358,7 +359,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> </li>
</span><span class="cx" style="display: block; padding: 0 10px"> </ul></li>';
</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->AssertEquals( $expected, wp_list_pages( $args ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertEqualsIgnoreEOL( $expected, wp_list_pages( $args ) );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> function test_wp_list_pages_link_after() {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -390,7 +391,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> </li>
</span><span class="cx" style="display: block; padding: 0 10px"> </ul></li>';
</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->AssertEquals( $expected, wp_list_pages( $args ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertEqualsIgnoreEOL( $expected, wp_list_pages( $args ) );
</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">@@ -404,7 +405,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> <li class="page_item page-item-' . self::$parent_3 . '"><a href="' . get_permalink( self::$parent_3 ) . '">Parent 3</a></li>
</span><span class="cx" style="display: block; padding: 0 10px"> </ul></li>';
</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->AssertEquals( $expected, wp_list_pages( $args ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertEqualsIgnoreEOL( $expected, wp_list_pages( $args ) );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> function test_wp_list_pages_exclude_tree() {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -422,7 +423,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> </li>
</span><span class="cx" style="display: block; padding: 0 10px"> </ul></li>';
</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->AssertEquals( $expected, wp_list_pages( $args ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertEqualsIgnoreEOL( $expected, wp_list_pages( $args ) );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> function test_wp_list_pages_discarded_whitespace() {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -433,6 +434,6 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $expected = '<li class="pagenav">Pages<ul><li class="page_item page-item-' . self::$parent_1 . ' page_item_has_children"><a href="' . get_permalink( self::$parent_1 ) . '">Parent 1</a><ul class=\'children\'><li class="page_item page-item-' . self::$children[ self::$parent_1 ][0] . '"><a href="' . get_permalink( self::$children[ self::$parent_1 ][0] ) . '">Child 1</a></li><li class="page_item page-item-' . self::$children[ self::$parent_1 ][1] . '"><a href="' . get_permalink( self::$children[ self::$parent_1 ][1] ) . '">Child 2</a></li><li class="page_item page-item-' . self::$children[ self::$parent_1 ][2] . '"><a href="' . get_permalink( self::$children[ self::$parent_1 ][2] ) . '">Child 3</a></li></ul></li><
;li class="page_item page-item-' . self::$parent_2 . ' page_item_has_children"><a href="' . get_permalink( self::$parent_2 ) . '">Parent 2</a><ul class=\'children\'><li class="page_item page-item-' . self::$children[ self::$parent_2 ][0] . '"><a href="' . get_permalink( self::$children[ self::$parent_2 ][0] ) . '">Child 1</a></li><li class="page_item page-item-' . self::$children[ self::$parent_2 ][1] . '"><a href="' . get_permalink( self::$children[ self::$parent_2 ][1] ) . '">Child 2</a></li><li class="page_item page-item-' . self::$children[ self::$parent_2 ][2] . '"><a href="' . get_permalink( self::$children[ self::$parent_2 ][2] ) . '">Child 3</a></li></ul></li><li class="page_item page-item-' . self::$parent_3 . ' page_item_has_children"><a href="' . get_permalink( self:
:$parent_3 ) . '">Parent 3</a><ul class=\'children\'><li class="page_item page-item-' . self::$children[ self::$parent_3 ][0] . '"><a href="' . get_permalink( self::$children[ self::$parent_3 ][0] ) . '">Child 1</a></li><li class="page_item page-item-' . self::$children[ self::$parent_3 ][1] . '"><a href="' . get_permalink( self::$children[ self::$parent_3 ][1] ) . '">Child 2</a></li><li class="page_item page-item-' . self::$children[ self::$parent_3 ][2] . '"><a href="' . get_permalink( self::$children[ self::$parent_3 ][2] ) . '">Child 3</a></li></ul></li></ul></li>';
</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->AssertEquals( $expected, wp_list_pages( $args ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertEquals( $expected, wp_list_pages( $args ) );
</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="trunktestsphpunittestsposttemplatephp"></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/template.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/post/template.php 2019-10-29 09:57:37 UTC (rev 46611)
+++ trunk/tests/phpunit/tests/post/template.php 2019-10-29 14:26:41 UTC (rev 46612)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -164,7 +164,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> LINEAGE;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $output = wp_dropdown_pages( array( 'echo' => 0 ) );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertEquals( $lineage, $output );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertEqualsIgnoreEOL( $lineage, $output );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $depth = <<<DEPTH
</span><span class="cx" style="display: block; padding: 0 10px"> <select name='page_id' id='page_id'>
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -179,7 +179,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 'depth' => 1,
</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->assertEquals( $depth, $output );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertEqualsIgnoreEOL( $depth, $output );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $option_none = <<<NONE
</span><span class="cx" style="display: block; padding: 0 10px"> <select name='page_id' id='page_id'>
</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"> 'option_none_value' => 'Woo',
</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->assertEquals( $option_none, $output );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertEqualsIgnoreEOL( $option_none, $output );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $option_no_change = <<<NO
</span><span class="cx" style="display: block; padding: 0 10px"> <select name='page_id' id='page_id'>
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -207,7 +207,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> </select>
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> NO;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $output = wp_dropdown_pages(
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+ $output = wp_dropdown_pages(
</ins><span class="cx" style="display: block; padding: 0 10px"> array(
</span><span class="cx" style="display: block; padding: 0 10px"> 'echo' => 0,
</span><span class="cx" style="display: block; padding: 0 10px"> 'depth' => 1,
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -216,7 +217,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 'show_option_no_change' => 'Burrito',
</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->assertEquals( $option_no_change, $output );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertEqualsIgnoreEOL( $option_no_change, $output );
</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>