<!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>[38763] trunk/tests/phpunit/tests: Build/Test Tools: Continue eliminating randomness in 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 { 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/38763">38763</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/38763","name":"Review Commit"}}</script></dd>
<dt style="float: left; width: 6em; font-weight: bold">Author</dt> <dd>johnbillion</dd>
<dt style="float: left; width: 6em; font-weight: bold">Date</dt> <dd>2016-10-09 01:29:04 +0000 (Sun, 09 Oct 2016)</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: Continue eliminating randomness in tests.
See <a href="https://core.trac.wordpress.org/changeset/38762">[38762]</a>
See <a href="https://core.trac.wordpress.org/ticket/37371">#37371</a></pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunktestsphpunittestsactionsclosuresphp">trunk/tests/phpunit/tests/actions/closures.php</a></li>
<li><a href="#trunktestsphpunittestsactionsphp">trunk/tests/phpunit/tests/actions.php</a></li>
<li><a href="#trunktestsphpunittestsadminincludesScreenphp">trunk/tests/phpunit/tests/admin/includesScreen.php</a></li>
<li><a href="#trunktestsphpunittestscachephp">trunk/tests/phpunit/tests/cache.php</a></li>
<li><a href="#trunktestsphpunittestscommentgetCommentAuthorEmailLinkphp">trunk/tests/phpunit/tests/comment/getCommentAuthorEmailLink.php</a></li>
<li><a href="#trunktestsphpunittestscommentsubmissionphp">trunk/tests/phpunit/tests/comment-submission.php</a></li>
<li><a href="#trunktestsphpunittestscommentphp">trunk/tests/phpunit/tests/comment.php</a></li>
<li><a href="#trunktestsphpunittestscronphp">trunk/tests/phpunit/tests/cron.php</a></li>
<li><a href="#trunktestsphpunittestscustomizesettingphp">trunk/tests/phpunit/tests/customize/setting.php</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunktestsphpunittestsactionsclosuresphp"></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/actions/closures.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/actions/closures.php 2016-10-09 01:11:14 UTC (rev 38762)
+++ trunk/tests/phpunit/tests/actions/closures.php 2016-10-09 01:29:04 UTC (rev 38763)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -17,7 +17,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame( 10, has_action($tag, $closure) );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $context = array( rand_str(), rand_str() );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $context = array( 'val1', 'val2' );
</ins><span class="cx" style="display: block; padding: 0 10px"> do_action($tag, $context[0], $context[1]);
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame($GLOBALS[$context[0]], $context[1]);
</span></span></pre></div>
<a id="trunktestsphpunittestsactionsphp"></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/actions.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/actions.php 2016-10-09 01:11:14 UTC (rev 38762)
+++ trunk/tests/phpunit/tests/actions.php 2016-10-09 01:29:04 UTC (rev 38763)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -9,7 +9,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> function test_simple_action() {
</span><span class="cx" style="display: block; padding: 0 10px"> $a = new MockAction();
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $tag = 'test_action';
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $tag = __FUNCTION__;
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> add_action($tag, array(&$a, 'action'));
</span><span class="cx" style="display: block; padding: 0 10px"> do_action($tag);
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -26,7 +26,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> function test_remove_action() {
</span><span class="cx" style="display: block; padding: 0 10px"> $a = new MockAction();
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $tag = rand_str();
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $tag = __FUNCTION__;
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> add_action($tag, array(&$a, 'action'));
</span><span class="cx" style="display: block; padding: 0 10px"> do_action($tag);
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -44,8 +44,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"> function test_has_action() {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $tag = rand_str();
- $func = rand_str();
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $tag = __FUNCTION__;
+ $func = __FUNCTION__ . '_func';
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertFalse( has_action($tag, $func) );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertFalse( has_action($tag) );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -61,7 +61,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> function test_multiple_actions() {
</span><span class="cx" style="display: block; padding: 0 10px"> $a1 = new MockAction();
</span><span class="cx" style="display: block; padding: 0 10px"> $a2 = new MockAction();
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $tag = rand_str();
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $tag = __FUNCTION__;
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // add both actions to the hook
</span><span class="cx" style="display: block; padding: 0 10px"> add_action($tag, array(&$a1, 'action'));
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -76,8 +76,8 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> function test_action_args_1() {
</span><span class="cx" style="display: block; padding: 0 10px"> $a = new MockAction();
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $tag = rand_str();
- $val = rand_str();
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $tag = __FUNCTION__;
+ $val = __FUNCTION__ . '_val';
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> add_action($tag, array(&$a, 'action'));
</span><span class="cx" style="display: block; padding: 0 10px"> // call the action with a single argument
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -92,9 +92,9 @@
</span><span class="cx" style="display: block; padding: 0 10px"> function test_action_args_2() {
</span><span class="cx" style="display: block; padding: 0 10px"> $a1 = new MockAction();
</span><span class="cx" style="display: block; padding: 0 10px"> $a2 = new MockAction();
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $tag = rand_str();
- $val1 = rand_str();
- $val2 = rand_str();
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $tag = __FUNCTION__;
+ $val1 = __FUNCTION__ . '_val1';
+ $val2 = __FUNCTION__ . '_val2';
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // a1 accepts two arguments, a2 doesn't
</span><span class="cx" style="display: block; padding: 0 10px"> add_action($tag, array(&$a1, 'action'), 10, 2);
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -125,9 +125,9 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $a1 = new MockAction();
</span><span class="cx" style="display: block; padding: 0 10px"> $a2 = new MockAction();
</span><span class="cx" style="display: block; padding: 0 10px"> $a3 = new MockAction();
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $tag = rand_str();
- $val1 = rand_str();
- $val2 = rand_str();
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $tag = __FUNCTION__;
+ $val1 = __FUNCTION__ . '_val1';
+ $val2 = __FUNCTION__ . '_val2';
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // a1 accepts two arguments, a2 doesn't, a3 accepts two arguments
</span><span class="cx" style="display: block; padding: 0 10px"> add_action( $tag, array( &$a1, 'action' ), 10, 2 );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -155,7 +155,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> function test_action_priority() {
</span><span class="cx" style="display: block; padding: 0 10px"> $a = new MockAction();
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $tag = rand_str();
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $tag = __FUNCTION__;
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> add_action($tag, array(&$a, 'action'), 10);
</span><span class="cx" style="display: block; padding: 0 10px"> add_action($tag, array(&$a, 'action2'), 9);
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -204,8 +204,8 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> function test_all_action() {
</span><span class="cx" style="display: block; padding: 0 10px"> $a = new MockAction();
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $tag1 = rand_str();
- $tag2 = rand_str();
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $tag1 = __FUNCTION__ . '_1';
+ $tag2 = __FUNCTION__ . '_2';
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // add an 'all' action
</span><span class="cx" style="display: block; padding: 0 10px"> add_action('all', array(&$a, 'action'));
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -228,7 +228,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> function test_remove_all_action() {
</span><span class="cx" style="display: block; padding: 0 10px"> $a = new MockAction();
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $tag = rand_str();
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $tag = __FUNCTION__;
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> add_action('all', array(&$a, 'action'));
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertEquals(10, has_filter('all', array(&$a, 'action')));
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -249,7 +249,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> function test_action_ref_array() {
</span><span class="cx" style="display: block; padding: 0 10px"> $obj = new stdClass();
</span><span class="cx" style="display: block; padding: 0 10px"> $a = new MockAction();
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $tag = rand_str();
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $tag = __FUNCTION__;
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> add_action($tag, array(&$a, 'action'));
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -268,17 +268,17 @@
</span><span class="cx" style="display: block; padding: 0 10px"> function test_action_keyed_array() {
</span><span class="cx" style="display: block; padding: 0 10px"> $a = new MockAction();
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $tag = rand_str();
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $tag = __FUNCTION__;
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> add_action($tag, array(&$a, 'action'));
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $context = array( rand_str() => rand_str() );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $context = array( 'key1' => 'val1' );
</ins><span class="cx" style="display: block; padding: 0 10px"> do_action($tag, $context);
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $args = $a->get_args();
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame($args[0][0], $context);
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $context2 = array( rand_str() => rand_str(), rand_str() => rand_str() );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $context2 = array( 'key2' => 'val2', 'key3' => 'val3' );
</ins><span class="cx" style="display: block; padding: 0 10px"> do_action($tag, $context2);
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $args = $a->get_args();
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -300,7 +300,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @ticket 17817
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function test_action_recursion() {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $tag = rand_str();
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $tag = __FUNCTION__;
</ins><span class="cx" style="display: block; padding: 0 10px"> $a = new MockAction();
</span><span class="cx" style="display: block; padding: 0 10px"> $b = new MockAction();
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -327,7 +327,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @ticket 17817
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function test_action_callback_manipulation_while_running() {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $tag = rand_str();
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $tag = __FUNCTION__;
</ins><span class="cx" style="display: block; padding: 0 10px"> $a = new MockAction();
</span><span class="cx" style="display: block; padding: 0 10px"> $b = new MockAction();
</span><span class="cx" style="display: block; padding: 0 10px"> $c = new MockAction();
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -362,7 +362,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * https://core.trac.wordpress.org/ticket/17817#comment:52
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function test_remove_anonymous_callback() {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $tag = rand_str();
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $tag = __FUNCTION__;
</ins><span class="cx" style="display: block; padding: 0 10px"> $a = new MockAction();
</span><span class="cx" style="display: block; padding: 0 10px"> add_action( $tag, array( $a, 'action' ), 12, 1 );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertTrue( has_action( $tag ) );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -396,7 +396,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function test_array_access_of_wp_filter_global() {
</span><span class="cx" style="display: block; padding: 0 10px"> global $wp_filter;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $tag = rand_str();
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $tag = __FUNCTION__;
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> add_action( $tag, '__return_null', 11, 1 );
</span><span class="cx" style="display: block; padding: 0 10px">
</span></span></pre></div>
<a id="trunktestsphpunittestsadminincludesScreenphp"></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/admin/includesScreen.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/admin/includesScreen.php 2016-10-09 01:11:14 UTC (rev 38762)
+++ trunk/tests/phpunit/tests/admin/includesScreen.php 2016-10-09 01:29:04 UTC (rev 38763)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -154,7 +154,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"> function test_help_tabs() {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $tab = rand_str();
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $tab = __FUNCTION__;
</ins><span class="cx" style="display: block; padding: 0 10px"> $tab_args = array(
</span><span class="cx" style="display: block; padding: 0 10px"> 'id' => $tab,
</span><span class="cx" style="display: block; padding: 0 10px"> 'title' => 'Help!',
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -278,7 +278,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @ticket 25799
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function test_options() {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $option = rand_str();
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $option = __FUNCTION__;
</ins><span class="cx" style="display: block; padding: 0 10px"> $option_args = array(
</span><span class="cx" style="display: block; padding: 0 10px"> 'label' => 'Option',
</span><span class="cx" style="display: block; padding: 0 10px"> 'default' => 10,
</span></span></pre></div>
<a id="trunktestsphpunittestscachephp"></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/cache.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/cache.php 2016-10-09 01:11:14 UTC (rev 38762)
+++ trunk/tests/phpunit/tests/cache.php 2016-10-09 01:29:04 UTC (rev 38763)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -27,19 +27,19 @@
</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"> function test_miss() {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertEquals(NULL, $this->cache->get(rand_str()));
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertEquals( NULL, $this->cache->get( 'test_miss' ) );
</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_add_get() {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $key = rand_str();
- $val = rand_str();
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $key = __FUNCTION__;
+ $val = 'val';
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $this->cache->add($key, $val);
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertEquals($val, $this->cache->get($key));
</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"> function test_add_get_0() {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $key = rand_str();
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $key = __FUNCTION__;
</ins><span class="cx" style="display: block; padding: 0 10px"> $val = 0;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // you can store zero in the cache
</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"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> function test_add_get_null() {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $key = rand_str();
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $key = __FUNCTION__;
</ins><span class="cx" style="display: block; padding: 0 10px"> $val = null;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertTrue( $this->cache->add($key, $val) );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -57,9 +57,9 @@
</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"> function test_add() {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $key = rand_str();
- $val1 = rand_str();
- $val2 = rand_str();
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $key = __FUNCTION__;
+ $val1 = 'val1';
+ $val2 = 'val2';
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // add $key to the cache
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertTrue($this->cache->add($key, $val1));
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -70,9 +70,9 @@
</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"> function test_replace() {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $key = rand_str();
- $val = rand_str();
- $val2 = rand_str();
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $key = __FUNCTION__;
+ $val = 'val1';
+ $val2 = 'val2';
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // memcached rejects replace() if the key does not exist
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertFalse($this->cache->replace($key, $val));
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -84,9 +84,9 @@
</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"> function test_set() {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $key = rand_str();
- $val1 = rand_str();
- $val2 = rand_str();
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $key = __FUNCTION__;
+ $val1 = 'val1';
+ $val2 = 'val2';
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // memcached accepts set() if the key does not exist
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertTrue($this->cache->set($key, $val1));
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -102,8 +102,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> if ( $_wp_using_ext_object_cache )
</span><span class="cx" style="display: block; padding: 0 10px"> return;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $key = rand_str();
- $val = rand_str();
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $key = __FUNCTION__;
+ $val = 'val';
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $this->cache->add($key, $val);
</span><span class="cx" style="display: block; padding: 0 10px"> // item is visible to both cache objects
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -115,7 +115,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Make sure objects are cloned going to and from the cache
</span><span class="cx" style="display: block; padding: 0 10px"> function test_object_refs() {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $key = rand_str();
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $key = __FUNCTION__ . '_1';
</ins><span class="cx" style="display: block; padding: 0 10px"> $object_a = new stdClass;
</span><span class="cx" style="display: block; padding: 0 10px"> $object_a->foo = 'alpha';
</span><span class="cx" style="display: block; padding: 0 10px"> $this->cache->set( $key, $object_a );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -125,7 +125,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $object_b->foo = 'charlie';
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertEquals( 'bravo', $object_a->foo );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $key = rand_str();
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $key = __FUNCTION__ . '_2';
</ins><span class="cx" style="display: block; padding: 0 10px"> $object_a = new stdClass;
</span><span class="cx" style="display: block; padding: 0 10px"> $object_a->foo = 'alpha';
</span><span class="cx" style="display: block; padding: 0 10px"> $this->cache->add( $key, $object_a );
</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"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> function test_incr() {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $key = rand_str();
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $key = __FUNCTION__;
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertFalse( $this->cache->incr( $key ) );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -150,7 +150,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"> function test_wp_cache_incr() {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $key = rand_str();
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $key = __FUNCTION__;
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertFalse( wp_cache_incr( $key ) );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -163,7 +163,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"> function test_decr() {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $key = rand_str();
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $key = __FUNCTION__;
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertFalse( $this->cache->decr( $key ) );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -183,7 +183,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @ticket 21327
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function test_wp_cache_decr() {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $key = rand_str();
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $key = __FUNCTION__;
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertFalse( wp_cache_decr( $key ) );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -200,8 +200,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"> function test_delete() {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $key = rand_str();
- $val = rand_str();
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $key = __FUNCTION__;
+ $val = 'val';
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Verify set
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertTrue( $this->cache->set( $key, $val ) );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -215,8 +215,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"> function test_wp_cache_delete() {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $key = rand_str();
- $val = rand_str();
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $key = __FUNCTION__;
+ $val = 'val';
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Verify set
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertTrue( wp_cache_set( $key, $val ) );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -237,9 +237,9 @@
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ! method_exists( $this->cache, 'switch_to_blog' ) )
</span><span class="cx" style="display: block; padding: 0 10px"> return;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $key = rand_str();
- $val = rand_str();
- $val2 = rand_str();
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $key = __FUNCTION__;
+ $val = 'val1';
+ $val2 = 'val2';
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ! is_multisite() ) {
</span><span class="cx" style="display: block; padding: 0 10px"> // Single site ingnores switch_to_blog().
</span></span></pre></div>
<a id="trunktestsphpunittestscommentgetCommentAuthorEmailLinkphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/tests/comment/getCommentAuthorEmailLink.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/comment/getCommentAuthorEmailLink.php 2016-10-09 01:11:14 UTC (rev 38762)
+++ trunk/tests/phpunit/tests/comment/getCommentAuthorEmailLink.php 2016-10-09 01:29:04 UTC (rev 38763)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -40,9 +40,9 @@
</span><span class="cx" style="display: block; padding: 0 10px"> public function test_all_parameters() {
</span><span class="cx" style="display: block; padding: 0 10px"> unset( $GLOBALS['comment'] );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $linktext = rand_str( 10 );
- $before = rand_str( 5 );
- $after = rand_str( 6 );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $linktext = 'linktext';
+ $before = 'before';
+ $after = 'after';
</ins><span class="cx" style="display: block; padding: 0 10px"> $comment = self::factory()->comment->create_and_get( array(
</span><span class="cx" style="display: block; padding: 0 10px"> 'comment_author_email' => $email = 'baz@example.org'
</span><span class="cx" style="display: block; padding: 0 10px"> ) );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -53,9 +53,9 @@
</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"> public function test_all_parameters_with_global_comment() {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $linktext = rand_str( 10 );
- $before = rand_str( 5 );
- $after = rand_str( 6 );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $linktext = 'linktext';
+ $before = 'before';
+ $after = 'after';
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $expected = sprintf( '%1$s<a href="mailto:foo@example.org">%2$s</a>%3$s', $before, $linktext, $after );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -63,19 +63,19 @@
</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"> public function test_linktext() {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $expected = sprintf( '<a href="mailto:foo@example.org">%1$s</a>', $linktext = rand_str( 12 ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $expected = sprintf( '<a href="mailto:foo@example.org">%1$s</a>', $linktext = 'linktext' );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertEquals( $expected, get_comment_author_email_link( $linktext ) );
</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"> public function test_before() {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $expected = sprintf( '%1$s<a href="mailto:foo@example.org">foo@example.org</a>', $before = rand_str( 5 ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $expected = sprintf( '%1$s<a href="mailto:foo@example.org">foo@example.org</a>', $before = 'before' );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertEquals( $expected, get_comment_author_email_link( '', $before ) );
</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"> public function test_after() {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $expected = sprintf( '<a href="mailto:foo@example.org">foo@example.org</a>%1$s', $after = rand_str( 5 ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $expected = sprintf( '<a href="mailto:foo@example.org">foo@example.org</a>%1$s', $after = 'after' );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertEquals( $expected, get_comment_author_email_link( '', '', $after ) );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span></span></pre></div>
<a id="trunktestsphpunittestscommentsubmissionphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/tests/comment-submission.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/comment-submission.php 2016-10-09 01:11:14 UTC (rev 38762)
+++ trunk/tests/phpunit/tests/comment-submission.php 2016-10-09 01:29:04 UTC (rev 38763)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -622,7 +622,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $data = array(
</span><span class="cx" style="display: block; padding: 0 10px"> 'comment_post_ID' => $post->ID,
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- 'comment' => rand_str(),
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'comment' => 'Comment',
</ins><span class="cx" style="display: block; padding: 0 10px"> 'author' => rand_long_str( 255 ),
</span><span class="cx" style="display: block; padding: 0 10px"> 'email' => 'comment@example.org',
</span><span class="cx" style="display: block; padding: 0 10px"> );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -642,7 +642,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $data = array(
</span><span class="cx" style="display: block; padding: 0 10px"> 'comment_post_ID' => $post->ID,
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- 'comment' => rand_str(),
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'comment' => 'Comment',
</ins><span class="cx" style="display: block; padding: 0 10px"> 'author' => 'Comment Author',
</span><span class="cx" style="display: block; padding: 0 10px"> 'email' => rand_long_str( 90 ) . '@example.com',
</span><span class="cx" style="display: block; padding: 0 10px"> );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -661,7 +661,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $post = self::factory()->post->create_and_get();
</span><span class="cx" style="display: block; padding: 0 10px"> $data = array(
</span><span class="cx" style="display: block; padding: 0 10px"> 'comment_post_ID' => $post->ID,
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- 'comment' => rand_str(),
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'comment' => 'Comment',
</ins><span class="cx" style="display: block; padding: 0 10px"> 'author' => 'Comment Author',
</span><span class="cx" style="display: block; padding: 0 10px"> 'email' => 'comment@example.org',
</span><span class="cx" style="display: block; padding: 0 10px"> 'url' => rand_long_str( 201 ),
</span></span></pre></div>
<a id="trunktestsphpunittestscommentphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/tests/comment.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/comment.php 2016-10-09 01:11:14 UTC (rev 38762)
+++ trunk/tests/phpunit/tests/comment.php 2016-10-09 01:29:04 UTC (rev 38763)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -127,11 +127,11 @@
</span><span class="cx" style="display: block; padding: 0 10px"> public function test_wp_new_comment_respects_dates() {
</span><span class="cx" style="display: block; padding: 0 10px"> $data = array(
</span><span class="cx" style="display: block; padding: 0 10px"> 'comment_post_ID' => self::$post_id,
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- 'comment_author' => rand_str(),
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'comment_author' => 'Comment Author',
</ins><span class="cx" style="display: block; padding: 0 10px"> 'comment_author_url' => '',
</span><span class="cx" style="display: block; padding: 0 10px"> 'comment_author_email' => '',
</span><span class="cx" style="display: block; padding: 0 10px"> 'comment_type' => '',
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- 'comment_content' => rand_str(),
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'comment_content' => 'Comment',
</ins><span class="cx" style="display: block; padding: 0 10px"> 'comment_date' => '2011-01-01 10:00:00',
</span><span class="cx" style="display: block; padding: 0 10px"> 'comment_date_gmt' => '2011-01-01 10:00:00',
</span><span class="cx" style="display: block; padding: 0 10px"> );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -150,12 +150,12 @@
</span><span class="cx" style="display: block; padding: 0 10px"> public function test_wp_new_comment_respects_author_ip() {
</span><span class="cx" style="display: block; padding: 0 10px"> $data = array(
</span><span class="cx" style="display: block; padding: 0 10px"> 'comment_post_ID' => self::$post_id,
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- 'comment_author' => rand_str(),
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'comment_author' => 'Comment Author',
</ins><span class="cx" style="display: block; padding: 0 10px"> 'comment_author_IP' => '192.168.1.1',
</span><span class="cx" style="display: block; padding: 0 10px"> 'comment_author_url' => '',
</span><span class="cx" style="display: block; padding: 0 10px"> 'comment_author_email' => '',
</span><span class="cx" style="display: block; padding: 0 10px"> 'comment_type' => '',
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- 'comment_content' => rand_str(),
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'comment_content' => 'Comment',
</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"> $id = wp_new_comment( $data );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -171,12 +171,12 @@
</span><span class="cx" style="display: block; padding: 0 10px"> public function test_wp_new_comment_respects_author_ip_empty_string() {
</span><span class="cx" style="display: block; padding: 0 10px"> $data = array(
</span><span class="cx" style="display: block; padding: 0 10px"> 'comment_post_ID' => self::$post_id,
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- 'comment_author' => rand_str(),
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'comment_author' => 'Comment Author',
</ins><span class="cx" style="display: block; padding: 0 10px"> 'comment_author_IP' => '',
</span><span class="cx" style="display: block; padding: 0 10px"> 'comment_author_url' => '',
</span><span class="cx" style="display: block; padding: 0 10px"> 'comment_author_email' => '',
</span><span class="cx" style="display: block; padding: 0 10px"> 'comment_type' => '',
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- 'comment_content' => rand_str(),
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'comment_content' => 'Comment',
</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"> $id = wp_new_comment( $data );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -192,13 +192,13 @@
</span><span class="cx" style="display: block; padding: 0 10px"> public function test_wp_new_comment_respects_comment_agent() {
</span><span class="cx" style="display: block; padding: 0 10px"> $data = array(
</span><span class="cx" style="display: block; padding: 0 10px"> 'comment_post_ID' => self::$post_id,
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- 'comment_author' => rand_str(),
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'comment_author' => 'Comment Author',
</ins><span class="cx" style="display: block; padding: 0 10px"> 'comment_author_IP' => '',
</span><span class="cx" style="display: block; padding: 0 10px"> 'comment_author_url' => '',
</span><span class="cx" style="display: block; padding: 0 10px"> 'comment_author_email' => '',
</span><span class="cx" style="display: block; padding: 0 10px"> 'comment_agent' => 'Mozilla/5.0 (iPhone; CPU iPhone OS 7_0 like Mac OS X; en-us) AppleWebKit/537.51.1 (KHTML, like Gecko) Version/7.0 Mobile/11A465 Safari/9537.53',
</span><span class="cx" style="display: block; padding: 0 10px"> 'comment_type' => '',
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- 'comment_content' => rand_str(),
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'comment_content' => 'Comment',
</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"> $id = wp_new_comment( $data );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -214,13 +214,13 @@
</span><span class="cx" style="display: block; padding: 0 10px"> public function test_wp_new_comment_should_trim_provided_comment_agent_to_254_chars() {
</span><span class="cx" style="display: block; padding: 0 10px"> $data = array(
</span><span class="cx" style="display: block; padding: 0 10px"> 'comment_post_ID' => self::$post_id,
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- 'comment_author' => rand_str(),
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'comment_author' => 'Comment Author',
</ins><span class="cx" style="display: block; padding: 0 10px"> 'comment_author_IP' => '',
</span><span class="cx" style="display: block; padding: 0 10px"> 'comment_author_url' => '',
</span><span class="cx" style="display: block; padding: 0 10px"> 'comment_author_email' => '',
</span><span class="cx" style="display: block; padding: 0 10px"> 'comment_agent' => 'Mozilla/5.0 (iPhone; CPU iPhone OS 7_0 like Mac OS X; en-us) AppleWebKit/537.51.1 (KHTML, like Gecko) Version/7.0 Mobile/11A465 Safari/9537.53 Opera/9.80 (X11; Linux i686; Ubuntu/14.10) Presto/2.12.388 Version/12.16 Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en; rv:1.8.1.4pre) Gecko/20070511 Camino/1.6pre',
</span><span class="cx" style="display: block; padding: 0 10px"> 'comment_type' => '',
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- 'comment_content' => rand_str(),
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'comment_content' => 'Comment',
</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"> $id = wp_new_comment( $data );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -236,13 +236,13 @@
</span><span class="cx" style="display: block; padding: 0 10px"> public function test_wp_new_comment_respects_comment_agent_empty_string() {
</span><span class="cx" style="display: block; padding: 0 10px"> $data = array(
</span><span class="cx" style="display: block; padding: 0 10px"> 'comment_post_ID' => self::$post_id,
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- 'comment_author' => rand_str(),
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'comment_author' => 'Comment Author',
</ins><span class="cx" style="display: block; padding: 0 10px"> 'comment_author_IP' => '',
</span><span class="cx" style="display: block; padding: 0 10px"> 'comment_author_url' => '',
</span><span class="cx" style="display: block; padding: 0 10px"> 'comment_author_email' => '',
</span><span class="cx" style="display: block; padding: 0 10px"> 'comment_agent' => '',
</span><span class="cx" style="display: block; padding: 0 10px"> 'comment_type' => '',
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- 'comment_content' => rand_str(),
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'comment_content' => 'Comment',
</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"> $id = wp_new_comment( $data );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -256,7 +256,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> public function test_comment_field_lengths() {
</span><span class="cx" style="display: block; padding: 0 10px"> $data = array(
</span><span class="cx" style="display: block; padding: 0 10px"> 'comment_post_ID' => self::$post_id,
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- 'comment_author' => rand_str(),
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'comment_author' => 'Comment Author',
</ins><span class="cx" style="display: block; padding: 0 10px"> 'comment_author_url' => '',
</span><span class="cx" style="display: block; padding: 0 10px"> 'comment_author_email' => '',
</span><span class="cx" style="display: block; padding: 0 10px"> 'comment_type' => '',
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -538,11 +538,11 @@
</span><span class="cx" style="display: block; padding: 0 10px"> // Moderators are notified when a new comment is added.
</span><span class="cx" style="display: block; padding: 0 10px"> $data = array(
</span><span class="cx" style="display: block; padding: 0 10px"> 'comment_post_ID' => $post,
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- 'comment_author' => rand_str(),
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'comment_author' => 'Comment Author',
</ins><span class="cx" style="display: block; padding: 0 10px"> 'comment_author_url' => '',
</span><span class="cx" style="display: block; padding: 0 10px"> 'comment_author_email' => '',
</span><span class="cx" style="display: block; padding: 0 10px"> 'comment_type' => '',
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- 'comment_content' => rand_str(),
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'comment_content' => 'Comment',
</ins><span class="cx" style="display: block; padding: 0 10px"> );
</span><span class="cx" style="display: block; padding: 0 10px"> wp_new_comment( $data );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -588,11 +588,11 @@
</span><span class="cx" style="display: block; padding: 0 10px"> // Post authors are notified when a new comment is added to their post.
</span><span class="cx" style="display: block; padding: 0 10px"> $data = array(
</span><span class="cx" style="display: block; padding: 0 10px"> 'comment_post_ID' => $post,
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- 'comment_author' => rand_str(),
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'comment_author' => 'Comment Author',
</ins><span class="cx" style="display: block; padding: 0 10px"> 'comment_author_url' => '',
</span><span class="cx" style="display: block; padding: 0 10px"> 'comment_author_email' => '',
</span><span class="cx" style="display: block; padding: 0 10px"> 'comment_type' => '',
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- 'comment_content' => rand_str(),
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'comment_content' => 'Comment',
</ins><span class="cx" style="display: block; padding: 0 10px"> );
</span><span class="cx" style="display: block; padding: 0 10px"> wp_new_comment( $data );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -638,13 +638,13 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $default_data = array(
</span><span class="cx" style="display: block; padding: 0 10px"> 'comment_post_ID' => self::$post_id,
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- 'comment_author' => rand_str(),
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'comment_author' => 'Comment Author',
</ins><span class="cx" style="display: block; padding: 0 10px"> 'comment_author_IP' => '192.168.0.1',
</span><span class="cx" style="display: block; padding: 0 10px"> 'comment_agent' => 'WRONG_AGENT',
</span><span class="cx" style="display: block; padding: 0 10px"> 'comment_author_url' => '',
</span><span class="cx" style="display: block; padding: 0 10px"> 'comment_author_email' => '',
</span><span class="cx" style="display: block; padding: 0 10px"> 'comment_type' => '',
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- 'comment_content' => rand_str(),
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'comment_content' => 'Comment',
</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"> $comment_id = wp_new_comment( $default_data );
</span></span></pre></div>
<a id="trunktestsphpunittestscronphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/tests/cron.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/cron.php 2016-10-09 01:11:14 UTC (rev 38762)
+++ trunk/tests/phpunit/tests/cron.php 2016-10-09 01:29:04 UTC (rev 38763)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -20,13 +20,13 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> function test_wp_get_schedule_empty() {
</span><span class="cx" style="display: block; padding: 0 10px"> // nothing scheduled
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $hook = rand_str();
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $hook = __FUNCTION__;
</ins><span class="cx" style="display: block; padding: 0 10px"> $this->assertFalse(wp_get_schedule($hook));
</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"> function test_schedule_event_single() {
</span><span class="cx" style="display: block; padding: 0 10px"> // schedule an event and make sure it's returned by wp_next_scheduled
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $hook = rand_str();
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $hook = __FUNCTION__;
</ins><span class="cx" style="display: block; padding: 0 10px"> $timestamp = strtotime('+1 hour');
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> wp_schedule_single_event( $timestamp, $hook );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -56,7 +56,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> function test_schedule_event() {
</span><span class="cx" style="display: block; padding: 0 10px"> // schedule an event and make sure it's returned by wp_next_scheduled
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $hook = rand_str();
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $hook = __FUNCTION__;
</ins><span class="cx" style="display: block; padding: 0 10px"> $recur = 'hourly';
</span><span class="cx" style="display: block; padding: 0 10px"> $timestamp = strtotime('+1 hour');
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -87,7 +87,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> function test_unschedule_event() {
</span><span class="cx" style="display: block; padding: 0 10px"> // schedule an event and make sure it's returned by wp_next_scheduled
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $hook = rand_str();
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $hook = __FUNCTION__;
</ins><span class="cx" style="display: block; padding: 0 10px"> $timestamp = strtotime('+1 hour');
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> wp_schedule_single_event( $timestamp, $hook );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -99,8 +99,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"> function test_clear_schedule() {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $hook = rand_str();
- $args = array(rand_str());
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $hook = __FUNCTION__;
+ $args = array( 'arg1' );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // schedule several events with and without arguments
</span><span class="cx" style="display: block; padding: 0 10px"> wp_schedule_single_event( strtotime('+1 hour'), $hook );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -125,8 +125,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"> function test_clear_schedule_multiple_args() {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $hook = rand_str();
- $args = array(rand_str(), rand_str());
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $hook = __FUNCTION__;
+ $args = array( 'arg1', 'arg2' );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // schedule several events with and without arguments
</span><span class="cx" style="display: block; padding: 0 10px"> wp_schedule_single_event( strtotime('+1 hour'), $hook );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -154,10 +154,10 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @ticket 10468
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function test_clear_schedule_new_args() {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $hook = rand_str();
- $args = array(rand_str());
- $multi_hook = rand_str();
- $multi_args = array(rand_str(), rand_str());
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $hook = __FUNCTION__;
+ $args = array( 'arg1' );
+ $multi_hook = __FUNCTION__ . '_multi';
+ $multi_args = array( 'arg2', 'arg3' );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // schedule several events with and without arguments
</span><span class="cx" style="display: block; padding: 0 10px"> wp_schedule_single_event( strtotime('+1 hour'), $hook );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -194,8 +194,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function test_duplicate_event() {
</span><span class="cx" style="display: block; padding: 0 10px"> // duplicate events close together should be skipped
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $hook = rand_str();
- $args = array(rand_str());
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $hook = __FUNCTION__;
+ $args = array( 'arg1' );
</ins><span class="cx" style="display: block; padding: 0 10px"> $ts1 = strtotime('+5 minutes');
</span><span class="cx" style="display: block; padding: 0 10px"> $ts2 = strtotime('+3 minutes');
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -213,8 +213,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function test_not_duplicate_event() {
</span><span class="cx" style="display: block; padding: 0 10px"> // duplicate events far apart should work normally
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $hook = rand_str();
- $args = array( rand_str() );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $hook = __FUNCTION__;
+ $args = array( 'arg1' );
</ins><span class="cx" style="display: block; padding: 0 10px"> $ts1 = strtotime( '+30 minutes' );
</span><span class="cx" style="display: block; padding: 0 10px"> $ts2 = strtotime( '+3 minutes' );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -232,8 +232,8 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> function test_not_duplicate_event_reversed() {
</span><span class="cx" style="display: block; padding: 0 10px"> // duplicate events far apart should work normally regardless of order
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $hook = rand_str();
- $args = array( rand_str() );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $hook = __FUNCTION__;
+ $args = array( 'arg1' );
</ins><span class="cx" style="display: block; padding: 0 10px"> $ts1 = strtotime( '+3 minutes' );
</span><span class="cx" style="display: block; padding: 0 10px"> $ts2 = strtotime( '+30 minutes' );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -274,7 +274,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> function test_run_schedule_single() {
</span><span class="cx" style="display: block; padding: 0 10px"> // schedule an event, run it, and make sure the hook is called
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $hook = rand_str();
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $hook = __FUNCTION__;
</ins><span class="cx" style="display: block; padding: 0 10px"> $args = array(rand_str());
</span><span class="cx" style="display: block; padding: 0 10px"> $timestamp = strtotime('-1 second');
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -300,7 +300,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> function test_run_schedule_recurring() {
</span><span class="cx" style="display: block; padding: 0 10px"> // schedule a recurring event, run it, and make sure the hook is called
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $hook = rand_str();
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $hook = __FUNCTION__;
</ins><span class="cx" style="display: block; padding: 0 10px"> $args = array(rand_str());
</span><span class="cx" style="display: block; padding: 0 10px"> $timestamp = strtotime('-1 second');
</span><span class="cx" style="display: block; padding: 0 10px"> $recur = 'hourly';
</span></span></pre></div>
<a id="trunktestsphpunittestscustomizesettingphp"></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/customize/setting.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/customize/setting.php 2016-10-09 01:11:14 UTC (rev 38762)
+++ trunk/tests/phpunit/tests/customize/setting.php 2016-10-09 01:29:04 UTC (rev 38763)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -480,7 +480,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> function test_is_current_blog_previewed() {
</span><span class="cx" style="display: block; padding: 0 10px"> $type = 'option';
</span><span class="cx" style="display: block; padding: 0 10px"> $name = 'blogname';
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $post_value = rand_str();
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $post_value = __FUNCTION__;
</ins><span class="cx" style="display: block; padding: 0 10px"> $this->manager->set_post_value( $name, $post_value );
</span><span class="cx" style="display: block; padding: 0 10px"> $setting = new WP_Customize_Setting( $this->manager, $name, compact( 'type' ) );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertFalse( $setting->is_current_blog_previewed() );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -504,7 +504,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $type = 'option';
</span><span class="cx" style="display: block; padding: 0 10px"> $name = 'blogdescription';
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $post_value = rand_str();
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $post_value = __FUNCTION__;
</ins><span class="cx" style="display: block; padding: 0 10px"> $this->manager->set_post_value( $name, $post_value );
</span><span class="cx" style="display: block; padding: 0 10px"> $setting = new WP_Customize_Setting( $this->manager, $name, compact( 'type' ) );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertFalse( $setting->is_current_blog_previewed() );
</span></span></pre>
</div>
</div>
</body>
</html>