<!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>[55563] trunk: Tests: Improve documentation and variable names in some formatting tests.</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { white-space: pre-line; overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta" style="font-size: 105%">
<dt style="float: left; width: 6em; font-weight: bold">Revision</dt> <dd><a style="font-weight: bold" href="https://core.trac.wordpress.org/changeset/55563">55563</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/55563","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>2023-03-19 12:51:14 +0000 (Sun, 19 Mar 2023)</dd>
</dl>
<pre style='padding-left: 1em; margin: 2em 0; border-left: 2px solid #ccc; line-height: 1.25; font-size: 105%; font-family: sans-serif'>Tests: Improve documentation and variable names in some formatting tests.
Includes documenting data provider values using hash notation in the tests for:
* `convert_smilies()`
* `get_url_in_content()`
* `links_add_target()`
* `normalize_whitespace()`
Follow-up to <a href="https://core.trac.wordpress.org/changeset/26191">[26191]</a>, <a href="https://core.trac.wordpress.org/changeset/26327">[26327]</a>, <a href="https://core.trac.wordpress.org/changeset/26328">[26328]</a>, <a href="https://core.trac.wordpress.org/changeset/26972">[26972]</a>, <a href="https://core.trac.wordpress.org/changeset/55562">[55562]</a>.
See <a href="https://core.trac.wordpress.org/ticket/57841">#57841</a>.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunksrcwpincludesformattingphp">trunk/src/wp-includes/formatting.php</a></li>
<li><a href="#trunktestsphpunittestsformattingconvertSmiliesphp">trunk/tests/phpunit/tests/formatting/convertSmilies.php</a></li>
<li><a href="#trunktestsphpunittestsformattinggetUrlInContentphp">trunk/tests/phpunit/tests/formatting/getUrlInContent.php</a></li>
<li><a href="#trunktestsphpunittestsformattinglinksAddTargetphp">trunk/tests/phpunit/tests/formatting/linksAddTarget.php</a></li>
<li><a href="#trunktestsphpunittestsformattingnormalizeWhitespacephp">trunk/tests/phpunit/tests/formatting/normalizeWhitespace.php</a></li>
<li><a href="#trunktestsphpunittestsformattingurlencodeDeepphp">trunk/tests/phpunit/tests/formatting/urlencodeDeep.php</a></li>
<li><a href="#trunktestsphpunittestsformattingwpParseStrphp">trunk/tests/phpunit/tests/formatting/wpParseStr.php</a></li>
<li><a href="#trunktestsphpunittestsksesphp">trunk/tests/phpunit/tests/kses.php</a></li>
<li><a href="#trunktestsphpunittestspluggablewpRandphp">trunk/tests/phpunit/tests/pluggable/wpRand.php</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunksrcwpincludesformattingphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/formatting.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/formatting.php 2023-03-19 12:03:30 UTC (rev 55562)
+++ trunk/src/wp-includes/formatting.php 2023-03-19 12:51:14 UTC (rev 55563)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -5337,12 +5337,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">- * Adds a Target attribute to all links in passed content.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Adds a target attribute to all links in passed content.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * This function by default only applies to `<a>` tags, however this can be
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * modified by the 3rd param.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * modified by the `$tags` parameter.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * *NOTE:* Any current target attributed will be stripped and replaced.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * *NOTE:* Any current target attribute will be stripped and replaced.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 2.7.0
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -5349,7 +5349,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @global string $_links_add_target
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @param string $content String to search for links in.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @param string $target The Target to add to the links.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @param string $target The target to add to the links.
</ins><span class="cx" style="display: block; padding: 0 10px"> * @param string[] $tags An array of tags to apply to.
</span><span class="cx" style="display: block; padding: 0 10px"> * @return string The processed content.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span></span></pre></div>
<a id="trunktestsphpunittestsformattingconvertSmiliesphp"></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/convertSmilies.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/formatting/convertSmilies.php 2023-03-19 12:03:30 UTC (rev 55562)
+++ trunk/tests/phpunit/tests/formatting/convertSmilies.php 2023-03-19 12:51:14 UTC (rev 55563)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -9,29 +9,34 @@
</span><span class="cx" style="display: block; padding: 0 10px"> class Tests_Formatting_ConvertSmilies extends WP_UnitTestCase {
</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">+ * Basic validation test to confirm that smilies are converted to image
+ * when use_smilies = 1 and not when use_smilies = 0.
+ *
</ins><span class="cx" style="display: block; padding: 0 10px"> * @dataProvider data_convert_standard_smilies
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- *
- * Basic Validation Test to confirm that smilies are converted to image
- * when use_smilies = 1 and not when use_smilies = 0
</del><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- public function test_convert_standard_smilies( $in_txt, $converted_txt ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ public function test_convert_standard_smilies( $input, $converted ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> // Standard smilies, use_smilies: ON.
</span><span class="cx" style="display: block; padding: 0 10px"> update_option( 'use_smilies', 1 );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> smilies_init();
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( $converted_txt, convert_smilies( $in_txt ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertSame( $converted, convert_smilies( $input ) );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Standard smilies, use_smilies: OFF.
</span><span class="cx" style="display: block; padding: 0 10px"> update_option( 'use_smilies', 0 );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( $in_txt, convert_smilies( $in_txt ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertSame( $input, convert_smilies( $input ) );
</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><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * Basic Test Content DataProvider
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Data provider.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * array ( input_txt, converted_output_txt)
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @return array {
+ * @type array {
+ * @type string $input Input content.
+ * @type string $converted Converted output.
+ * }
+ * }
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function data_convert_standard_smilies() {
</span><span class="cx" style="display: block; padding: 0 10px"> $includes_path = includes_url( 'images/smilies/' );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -65,11 +70,11 @@
</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">+ * Tests that custom smilies are converted to images when use_smilies = 1.
+ *
</ins><span class="cx" style="display: block; padding: 0 10px"> * @dataProvider data_convert_custom_smilies
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- *
- * Validate Custom Smilies are converted to images when use_smilies = 1
</del><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- public function test_convert_custom_smilies( $in_txt, $converted_txt ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ public function test_convert_custom_smilies( $input, $converted ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> global $wpsmiliestrans;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Custom smilies, use_smilies: ON.
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -90,20 +95,25 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> smilies_init();
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( $converted_txt, convert_smilies( $in_txt ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertSame( $converted, convert_smilies( $input ) );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Standard smilies, use_smilies: OFF.
</span><span class="cx" style="display: block; padding: 0 10px"> update_option( 'use_smilies', 0 );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( $in_txt, convert_smilies( $in_txt ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertSame( $input, convert_smilies( $input ) );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $wpsmiliestrans = $trans_orig; // Reset original translations array.
</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">- * Custom Smilies Test Content DataProvider
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Data provider.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * array ( input_txt, converted_output_txt)
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @return array {
+ * @type array {
+ * @type string $input Input content.
+ * @type string $converted Converted output.
+ * }
+ * }
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function data_convert_custom_smilies() {
</span><span class="cx" style="display: block; padding: 0 10px"> $includes_path = includes_url( 'images/smilies/' );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -125,8 +135,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * Validate Conversion of Smilies is ignored in pre-determined tags
- * pre, code, script, style
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Tests that conversion of smilies is ignored in pre-determined tags:
+ * pre, code, script, style.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @ticket 16448
</span><span class="cx" style="display: block; padding: 0 10px"> * @dataProvider data_ignore_smilies_in_tags
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -134,14 +144,14 @@
</span><span class="cx" style="display: block; padding: 0 10px"> public function test_ignore_smilies_in_tags( $element ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $includes_path = includes_url( 'images/smilies/' );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $in_str = 'Do we ingore smilies ;-) in ' . $element . ' tags <' . $element . ' class="foo">My Content Here :?: </' . $element . '>';
- $exp_str = "Do we ingore smilies \xf0\x9f\x98\x89 in $element tags <$element class=\"foo\">My Content Here :?: </$element>";
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $input = 'Do we ignore smilies ;-) in ' . $element . ' tags <' . $element . ' class="foo">My Content Here :?: </' . $element . '>';
+ $expected = "Do we ignore smilies \xf0\x9f\x98\x89 in $element tags <$element class=\"foo\">My Content Here :?: </$element>";
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Standard smilies, use_smilies: ON.
</span><span class="cx" style="display: block; padding: 0 10px"> update_option( 'use_smilies', 1 );
</span><span class="cx" style="display: block; padding: 0 10px"> smilies_init();
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( $exp_str, convert_smilies( $in_str ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertSame( $expected, convert_smilies( $input ) );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Standard smilies, use_smilies: OFF.
</span><span class="cx" style="display: block; padding: 0 10px"> update_option( 'use_smilies', 0 );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -148,7 +158,13 @@
</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">- * DataProvider of HTML elements/tags that smilie matches should be ignored in
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Data provider.
+ *
+ * @return array {
+ * @type array {
+ * @type string $element HTML tag name.
+ * }
+ * }
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function data_ignore_smilies_in_tags() {
</span><span class="cx" style="display: block; padding: 0 10px"> return array(
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -161,27 +177,34 @@
</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">- * Validate Combinations of Smilies separated by single space
- * are converted correctly
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Tests that combinations of smilies separated by a single space
+ * are converted correctly.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @ticket 20124
</span><span class="cx" style="display: block; padding: 0 10px"> * @dataProvider data_smilies_combinations
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- public function test_smilies_combinations( $in_txt, $converted_txt ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ public function test_smilies_combinations( $input, $converted ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> // Custom smilies, use_smilies: ON.
</span><span class="cx" style="display: block; padding: 0 10px"> update_option( 'use_smilies', 1 );
</span><span class="cx" style="display: block; padding: 0 10px"> smilies_init();
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( $converted_txt, convert_smilies( $in_txt ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertSame( $converted, convert_smilies( $input ) );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Custom smilies, use_smilies: OFF.
</span><span class="cx" style="display: block; padding: 0 10px"> update_option( 'use_smilies', 0 );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( $in_txt, convert_smilies( $in_txt ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertSame( $input, convert_smilies( $input ) );
</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><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * DataProvider of Smilie Combinations
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Data provider.
+ *
+ * @return array {
+ * @type array {
+ * @type string $input Input content.
+ * @type string $converted Converted output.
+ * }
+ * }
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function data_smilies_combinations() {
</span><span class="cx" style="display: block; padding: 0 10px"> $includes_path = includes_url( 'images/smilies/' );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -215,13 +238,13 @@
</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">- * Validate Smilies are converted for single smilie in
- * the $wpsmiliestrans global array
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Tests that smilies are converted for single smilie in
+ * the $wpsmiliestrans global array.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @ticket 25303
</span><span class="cx" style="display: block; padding: 0 10px"> * @dataProvider data_single_smilies_in_wpsmiliestrans
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- public function test_single_smilies_in_wpsmiliestrans( $in_txt, $converted_txt ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ public function test_single_smilies_in_wpsmiliestrans( $input, $converted ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> global $wpsmiliestrans;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Standard smilies, use_smilies: ON.
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -239,18 +262,25 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> smilies_init();
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( $converted_txt, convert_smilies( $in_txt ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertSame( $converted, convert_smilies( $input ) );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Standard smilies, use_smilies: OFF.
</span><span class="cx" style="display: block; padding: 0 10px"> update_option( 'use_smilies', 0 );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( $in_txt, convert_smilies( $in_txt ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertSame( $input, convert_smilies( $input ) );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $wpsmiliestrans = $orig_trans; // Reset original translations array.
</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">- * DataProvider of Single Smilies input and converted output
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Data provider.
+ *
+ * @return array {
+ * @type array {
+ * @type string $input Input content.
+ * @type string $converted Converted output.
+ * }
+ * }
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function data_single_smilies_in_wpsmiliestrans() {
</span><span class="cx" style="display: block; padding: 0 10px"> $includes_path = includes_url( 'images/smilies/' );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -272,27 +302,37 @@
</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">- * Check that $wp_smiliessearch pattern will match smilies
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Tests that $wp_smiliessearch pattern will match smilies
</ins><span class="cx" style="display: block; padding: 0 10px"> * between spaces, but never capture those spaces.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * Further check that spaces aren't randomly deleted
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Further tests that spaces aren't randomly deleted
</ins><span class="cx" style="display: block; padding: 0 10px"> * or added when replacing the text with an image.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @ticket 22692
</span><span class="cx" style="display: block; padding: 0 10px"> * @dataProvider data_spaces_around_smilies
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- public function test_spaces_around_smilies( $in_txt, $converted_txt ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ public function test_spaces_around_smilies( $input, $converted ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> // Standard smilies, use_smilies: ON.
</span><span class="cx" style="display: block; padding: 0 10px"> update_option( 'use_smilies', 1 );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> smilies_init();
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( $converted_txt, convert_smilies( $in_txt ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertSame( $converted, convert_smilies( $input ) );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Standard smilies, use_smilies: OFF.
</span><span class="cx" style="display: block; padding: 0 10px"> update_option( 'use_smilies', 0 );
</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">+ /**
+ * Data provider.
+ *
+ * @return array {
+ * @type array {
+ * @type string $input Input content.
+ * @type string $converted Converted output.
+ * }
+ * }
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> public function data_spaces_around_smilies() {
</span><span class="cx" style="display: block; padding: 0 10px"> $nbsp = "\xC2\xA0";
</span><span class="cx" style="display: block; padding: 0 10px">
</span></span></pre></div>
<a id="trunktestsphpunittestsformattinggetUrlInContentphp"></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/getUrlInContent.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/formatting/getUrlInContent.php 2023-03-19 12:03:30 UTC (rev 55562)
+++ trunk/tests/phpunit/tests/formatting/getUrlInContent.php 2023-03-19 12:51:14 UTC (rev 55563)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -8,18 +8,23 @@
</span><span class="cx" style="display: block; padding: 0 10px"> class Tests_Formatting_GetUrlInContent extends WP_UnitTestCase {
</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">- * Validate the get_url_in_content function
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Tests the get_url_in_content() function.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @dataProvider data_get_url_in_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">- public function test_get_url_in_content( $in_str, $exp_str ) {
- $this->assertSame( $exp_str, get_url_in_content( $in_str ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ public function test_get_url_in_content( $input, $expected ) {
+ $this->assertSame( $expected, get_url_in_content( $input ) );
</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><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * URL Content Data Provider
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Data provider.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * array ( input_txt, converted_output_txt )
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @return array {
+ * @type array {
+ * @type string $input Input content.
+ * @type string $expected Expected output.
+ * }
+ * }
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function data_get_url_in_content() {
</span><span class="cx" style="display: block; padding: 0 10px"> return array(
</span></span></pre></div>
<a id="trunktestsphpunittestsformattinglinksAddTargetphp"></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/linksAddTarget.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/formatting/linksAddTarget.php 2023-03-19 12:03:30 UTC (rev 55562)
+++ trunk/tests/phpunit/tests/formatting/linksAddTarget.php 2023-03-19 12:51:14 UTC (rev 55563)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -7,24 +7,31 @@
</span><span class="cx" style="display: block; padding: 0 10px"> class Tests_Formatting_LinksAddTarget extends WP_UnitTestCase {
</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">- * Validate the normalize_whitespace function
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Tests the links_add_target() function.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @dataProvider data_links_add_target
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- public function test_links_add_target( $content, $target, $tags, $exp_str ) {
- if ( true === is_null( $target ) ) {
- $this->assertSame( $exp_str, links_add_target( $content ) );
- } elseif ( true === is_null( $tags ) ) {
- $this->assertSame( $exp_str, links_add_target( $content, $target ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ public function test_links_add_target( $content, $target, $tags, $expected ) {
+ if ( is_null( $target ) ) {
+ $this->assertSame( $expected, links_add_target( $content ) );
+ } elseif ( is_null( $tags ) ) {
+ $this->assertSame( $expected, links_add_target( $content, $target ) );
</ins><span class="cx" style="display: block; padding: 0 10px"> } else {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( $exp_str, links_add_target( $content, $target, $tags ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertSame( $expected, links_add_target( $content, $target, $tags ) );
</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="cx" style="display: block; padding: 0 10px"> /**
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * Test Content DataProvider
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Data provider.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * array ( input_txt, converted_output_txt)
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @return array {
+ * @type array {
+ * @type string $content String to search for links in.
+ * @type string $target The target to add to the links.
+ * @type string $tags An array of tags to apply to.
+ * @type string $expected Expected output.
+ * }
+ * }
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function data_links_add_target() {
</span><span class="cx" style="display: block; padding: 0 10px"> return array(
</span></span></pre></div>
<a id="trunktestsphpunittestsformattingnormalizeWhitespacephp"></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/normalizeWhitespace.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/formatting/normalizeWhitespace.php 2023-03-19 12:03:30 UTC (rev 55562)
+++ trunk/tests/phpunit/tests/formatting/normalizeWhitespace.php 2023-03-19 12:51:14 UTC (rev 55563)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -7,18 +7,23 @@
</span><span class="cx" style="display: block; padding: 0 10px"> class Tests_Formatting_NormalizeWhitespace extends WP_UnitTestCase {
</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">- * Validate the normalize_whitespace function
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Tests the the normalize_whitespace() function.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @dataProvider data_normalize_whitespace
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- public function test_normalize_whitespace( $in_str, $exp_str ) {
- $this->assertSame( $exp_str, normalize_whitespace( $in_str ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ public function test_normalize_whitespace( $input, $expected ) {
+ $this->assertSame( $expected, normalize_whitespace( $input ) );
</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><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * WhitespaceTest Content DataProvider
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Data provider.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * array( input_txt, converted_output_txt)
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @return array {
+ * @type array {
+ * @type string $input Input content.
+ * @type string $expected Expected output.
+ * }
+ * }
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function data_normalize_whitespace() {
</span><span class="cx" style="display: block; padding: 0 10px"> return array(
</span></span></pre></div>
<a id="trunktestsphpunittestsformattingurlencodeDeepphp"></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/urlencodeDeep.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/formatting/urlencodeDeep.php 2023-03-19 12:03:30 UTC (rev 55562)
+++ trunk/tests/phpunit/tests/formatting/urlencodeDeep.php 2023-03-19 12:51:14 UTC (rev 55563)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -9,8 +9,20 @@
</span><span class="cx" style="display: block; padding: 0 10px"> class Tests_Formatting_UrlencodeDeep extends WP_UnitTestCase {
</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">- * Data Provider
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Tests the urlencode_deep() function pair by pair.
+ *
+ * @dataProvider data_urlencode_deep
+ *
+ * @param string $input
+ * @param string $expected
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ public function test_urlencode_deep_should_encode_individual_value( $input, $expected ) {
+ $this->assertSame( $expected, urlencode_deep( $input ) );
+ }
+
+ /**
+ * Data provider.
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> public function data_urlencode_deep() {
</span><span class="cx" style="display: block; padding: 0 10px"> return array(
</span><span class="cx" style="display: block; padding: 0 10px"> array( 'qwerty123456', 'qwerty123456' ),
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -22,20 +34,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * Validate the urlencode_deep function pair by pair
- *
- * @dataProvider data_urlencode_deep
- *
- * @param string $actual
- * @param string $expected
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Tests the whole array as input.
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- public function test_urlencode_deep_should_encode_individual_value( $actual, $expected ) {
- $this->assertSame( $expected, urlencode_deep( $actual ) );
- }
-
- /**
- * Test the whole array as input
- */
</del><span class="cx" style="display: block; padding: 0 10px"> public function test_urlencode_deep_should_encode_all_values_in_array() {
</span><span class="cx" style="display: block; padding: 0 10px"> $data = $this->data_urlencode_deep();
</span><span class="cx" style="display: block; padding: 0 10px">
</span></span></pre></div>
<a id="trunktestsphpunittestsformattingwpParseStrphp"></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/wpParseStr.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/formatting/wpParseStr.php 2023-03-19 12:03:30 UTC (rev 55562)
+++ trunk/tests/phpunit/tests/formatting/wpParseStr.php 2023-03-19 12:51:14 UTC (rev 55563)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -24,7 +24,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * Data Provider.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Data provider.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @return array
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span></span></pre></div>
<a id="trunktestsphpunittestsksesphp"></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/kses.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/kses.php 2023-03-19 12:03:30 UTC (rev 55562)
+++ trunk/tests/phpunit/tests/kses.php 2023-03-19 12:51:14 UTC (rev 55563)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -947,7 +947,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * Data Provider for test_safecss_filter_attr().
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Data provider for test_safecss_filter_attr().
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @return array {
</span><span class="cx" style="display: block; padding: 0 10px"> * @type array {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1580,7 +1580,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * Data Provider for test_safecss_filter_attr_filtered().
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Data provider for test_safecss_filter_attr_filtered().
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @return array {
</span><span class="cx" style="display: block; padding: 0 10px"> * @type array {
</span></span></pre></div>
<a id="trunktestsphpunittestspluggablewpRandphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/tests/pluggable/wpRand.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/pluggable/wpRand.php 2023-03-19 12:03:30 UTC (rev 55562)
+++ trunk/tests/phpunit/tests/pluggable/wpRand.php 2023-03-19 12:51:14 UTC (rev 55563)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -20,7 +20,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertGreaterThanOrEqual(
</span><span class="cx" style="display: block; padding: 0 10px"> 0,
</span><span class="cx" style="display: block; padding: 0 10px"> wp_rand( $min, $max ),
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- 'The value was not greater than or equal 0'
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'The value was not greater than or equal to 0'
</ins><span class="cx" style="display: block; padding: 0 10px"> );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertLessThan(
</span></span></pre>
</div>
</div>
</body>
</html>