<!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>[Tests][967] trunk/tests: Pinking shears</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, #logmsg > ol { margin-left: 0; 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">
<dt>Revision</dt> <dd><a href="http://unit-tests.trac.wordpress.org/changeset/967">967</a></dd>
<dt>Author</dt> <dd>ryan</dd>
<dt>Date</dt> <dd>2012-08-13 21:07:27 +0000 (Mon, 13 Aug 2012)</dd>
</dl>

<h3>Log Message</h3>
<pre>Pinking shears</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunktestsajaxAutosavephp">trunk/tests/ajax/Autosave.php</a></li>
<li><a href="#trunktestsajaxCompressionphp">trunk/tests/ajax/Compression.php</a></li>
<li><a href="#trunktestsajaxDeleteCommentphp">trunk/tests/ajax/DeleteComment.php</a></li>
<li><a href="#trunktestsajaxDimCommentphp">trunk/tests/ajax/DimComment.php</a></li>
<li><a href="#trunktestsajaxEditCommentphp">trunk/tests/ajax/EditComment.php</a></li>
<li><a href="#trunktestsajaxGetCommentsphp">trunk/tests/ajax/GetComments.php</a></li>
<li><a href="#trunktestsajaxReplytoCommentphp">trunk/tests/ajax/ReplytoComment.php</a></li>
<li><a href="#trunktestsajaxTagSearchphp">trunk/tests/ajax/TagSearch.php</a></li>
<li><a href="#trunktestsuserphp">trunk/tests/user.php</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunktestsajaxAutosavephp"></a>
<div class="modfile"><h4>Modified: trunk/tests/ajax/Autosave.php (966 => 967)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/tests/ajax/Autosave.php        2012-08-13 21:06:12 UTC (rev 966)
+++ trunk/tests/ajax/Autosave.php        2012-08-13 21:07:27 UTC (rev 967)
</span><span class="lines">@@ -21,7 +21,7 @@
</span><span class="cx">          * @var mixed
</span><span class="cx">          */
</span><span class="cx">         protected $_post = null;
</span><del>-        
</del><ins>+
</ins><span class="cx">         /**
</span><span class="cx">          * Set up the test fixture
</span><span class="cx">          */
</span><span class="lines">@@ -36,16 +36,16 @@
</span><span class="cx">          * @return void
</span><span class="cx">          */
</span><span class="cx">         public function test_nopriv_autosave() {
</span><del>-                
</del><ins>+
</ins><span class="cx">                 // Log out
</span><span class="cx">                 wp_logout();
</span><del>-                
</del><ins>+
</ins><span class="cx">                 // Set up a default request
</span><span class="cx">                 $_POST = array(
</span><span class="cx">                     'post_ID'  =&gt; 1,
</span><span class="cx">                     'autosave' =&gt; 1
</span><span class="cx">                 );
</span><del>-                
</del><ins>+
</ins><span class="cx">                 // Make the request
</span><span class="cx">                 try {
</span><span class="cx">                         $this-&gt;_handleAjax( 'nopriv_autosave' );
</span><span class="lines">@@ -66,20 +66,20 @@
</span><span class="cx">          * @return void
</span><span class="cx">          */
</span><span class="cx">         public function test_nopriv_no_postid() {
</span><del>-                
</del><ins>+
</ins><span class="cx">                 // Log out
</span><span class="cx">                 wp_logout();
</span><del>-                
</del><ins>+
</ins><span class="cx">                 // Set up a request
</span><span class="cx">                 $_POST = array(
</span><span class="cx">                     'autosave'      =&gt; 1
</span><span class="cx">                 );
</span><del>-                
</del><ins>+
</ins><span class="cx">                 // Make the request
</span><span class="cx">                 $this-&gt;setExpectedException( 'WPAjaxDieStopException', '-1' );
</span><span class="cx">                 $this-&gt;_handleAjax( 'nopriv_autosave' );
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         /**
</span><span class="cx">          * Test autosaving a post
</span><span class="cx">          * @return void
</span><span class="lines">@@ -88,7 +88,7 @@
</span><span class="cx"> 
</span><span class="cx">                 // Become an admin
</span><span class="cx">                 $this-&gt;_setRole( 'administrator' );
</span><del>-                        
</del><ins>+
</ins><span class="cx">                 // Set up the $_POST request
</span><span class="cx">                 $md5 = md5( uniqid() );
</span><span class="cx">                 $_POST = array(
</span><span class="lines">@@ -104,14 +104,14 @@
</span><span class="cx">                 } catch ( WPAjaxDieContinueException $e ) {
</span><span class="cx">                         unset( $e );
</span><span class="cx">                 }
</span><del>-                
</del><ins>+
</ins><span class="cx">                 // Get the response
</span><span class="cx">                 $xml = simplexml_load_string( $this-&gt;_last_response, 'SimpleXMLElement', LIBXML_NOCDATA );
</span><span class="cx"> 
</span><span class="cx">                 // Ensure everything is correct
</span><span class="cx">                 $this-&gt;assertEquals( $this-&gt;_post-&gt;ID, (int) $xml-&gt;response[0]-&gt;autosave['id'] );
</span><span class="cx">                 $this-&gt;assertEquals( 'autosave_' . $this-&gt;_post-&gt;ID, (string) $xml-&gt;response['action']);
</span><del>-                
</del><ins>+
</ins><span class="cx">                 // Check that the edit happened
</span><span class="cx">                 $post = get_post( $this-&gt;_post-&gt;ID) ;
</span><span class="cx">                 $this-&gt;assertGreaterThanOrEqual( 0, strpos( $post-&gt;post_content, $md5 ) );
</span><span class="lines">@@ -122,8 +122,8 @@
</span><span class="cx">          * @return void
</span><span class="cx">          */
</span><span class="cx">         public function test_with_invalid_nonce( ) {
</span><del>-                
-                // Become an administrator                
</del><ins>+
+                // Become an administrator
</ins><span class="cx">                 $this-&gt;_setRole( 'administrator' );
</span><span class="cx"> 
</span><span class="cx">                 // Set up the $_POST request
</span><span class="lines">@@ -137,14 +137,14 @@
</span><span class="cx">                 $this-&gt;setExpectedException( 'WPAjaxDieStopException', '-1' );
</span><span class="cx">                 $this-&gt;_handleAjax( 'autosave' );
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         /**
</span><span class="cx">          * Test with a bad post id
</span><span class="cx">          * @return void
</span><span class="cx">          */
</span><span class="cx">         public function test_with_invalid_post_id( ) {
</span><del>-                
-                // Become an administrator        
</del><ins>+
+                // Become an administrator
</ins><span class="cx">                 $this-&gt;_setRole( 'administrator' );
</span><span class="cx"> 
</span><span class="cx">                 // Set up the $_POST request
</span><span class="lines">@@ -158,22 +158,22 @@
</span><span class="cx">                 $this-&gt;setExpectedException( 'WPAjaxDieStopException', 'You are not allowed to edit this post.' );
</span><span class="cx">                 $this-&gt;_handleAjax( 'autosave' );
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         /**
</span><span class="cx">          * Test with a locked post
</span><span class="cx">          * @return void
</span><span class="cx">          */
</span><span class="cx">         public function test_locked_post() {
</span><span class="cx"> 
</span><del>-                // Become an administrator                
</del><ins>+                // Become an administrator
</ins><span class="cx">                 $this-&gt;_setRole( 'administrator' );
</span><del>-                
</del><ins>+
</ins><span class="cx">                 // Lock the post
</span><span class="cx">                 wp_set_post_lock( $this-&gt;_post-&gt;ID );
</span><del>-                
</del><ins>+
</ins><span class="cx">                 // Become a different administrator
</span><span class="cx">                 $this-&gt;_setRole( 'administrator' );
</span><del>-        
</del><ins>+
</ins><span class="cx">                 // Set up the $_POST request
</span><span class="cx">                 $_POST = array(
</span><span class="cx">                     'post_ID'       =&gt; $this-&gt;_post-&gt;ID,
</span><span class="lines">@@ -206,9 +206,9 @@
</span><span class="cx">                 global $login_grace_period;
</span><span class="cx">                 $login_grace_period = 1;
</span><span class="cx"> 
</span><del>-                // Become an admnistrator                
</del><ins>+                // Become an admnistrator
</ins><span class="cx">                 $this-&gt;_setRole( 'administrator' );
</span><del>-                        
</del><ins>+
</ins><span class="cx">                 // Set up the $_POST request
</span><span class="cx">                 $_POST = array(
</span><span class="cx">                     'post_ID'       =&gt; $this-&gt;_post-&gt;ID,
</span></span></pre></div>
<a id="trunktestsajaxCompressionphp"></a>
<div class="modfile"><h4>Modified: trunk/tests/ajax/Compression.php (966 => 967)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/tests/ajax/Compression.php        2012-08-13 21:06:12 UTC (rev 966)
+++ trunk/tests/ajax/Compression.php        2012-08-13 21:07:27 UTC (rev 967)
</span><span class="lines">@@ -15,7 +15,7 @@
</span><span class="cx">  * @runTestsInSeparateProcesses
</span><span class="cx">  */
</span><span class="cx"> class Tests_Ajax_CompressionTest extends WP_Ajax_UnitTestCase {
</span><del>-        
</del><ins>+
</ins><span class="cx">         /**
</span><span class="cx">          * Test as a logged out user
</span><span class="cx">          */
</span><span class="lines">@@ -29,7 +29,7 @@
</span><span class="cx">                 $this-&gt;setExpectedException( 'WPAjaxDieStopException', '0' );
</span><span class="cx">                 $this-&gt;_handleAjax( 'wp-compression-test' );
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         /**
</span><span class="cx">          * Fetch the test text
</span><span class="cx">          */
</span><span class="lines">@@ -87,7 +87,7 @@
</span><span class="cx">                 if ( !function_exists('gzencode') ) {
</span><span class="cx">                         $this-&gt;markTestSkipped( 'gzencode function not available' );
</span><span class="cx">                 }
</span><del>-                
</del><ins>+
</ins><span class="cx">                 // Become an administrator
</span><span class="cx">                 $this-&gt;_setRole( 'administrator' );
</span><span class="cx"> 
</span><span class="lines">@@ -105,12 +105,12 @@
</span><span class="cx">                 // Ensure we found the right match
</span><span class="cx">                 $this-&gt;assertContains( 'wpCompressionTest', $this-&gt;_gzdecode( $this-&gt;_last_response ) );
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         /**
</span><span class="cx">          * Fetch the test text (unknown encoding)
</span><span class="cx">          */
</span><span class="cx">         public function test_unknown_encoding() {
</span><del>-                
</del><ins>+
</ins><span class="cx">                 // Become an administrator
</span><span class="cx">                 $this-&gt;_setRole( 'administrator' );
</span><span class="cx"> 
</span><span class="lines">@@ -127,7 +127,7 @@
</span><span class="cx">          * Set the 'can_compress_scripts' site option to true
</span><span class="cx">          */
</span><span class="cx">         public function test_set_yes() {
</span><del>-                
</del><ins>+
</ins><span class="cx">                 // Become an administrator
</span><span class="cx">                 $this-&gt;_setRole( 'administrator' );
</span><span class="cx"> 
</span><span class="lines">@@ -136,14 +136,14 @@
</span><span class="cx"> 
</span><span class="cx">                 // Set the option to false
</span><span class="cx">                 update_site_option( 'can_compress_scripts', 0 );
</span><del>-                
</del><ins>+
</ins><span class="cx">                 // Make the request
</span><span class="cx">                 try {
</span><span class="cx">                         $this-&gt;_handleAjax( 'wp-compression-test' );
</span><span class="cx">                 } catch ( WPAjaxDieStopException $e ) {
</span><span class="cx">                         unset( $e );
</span><span class="cx">                 }
</span><del>-                
</del><ins>+
</ins><span class="cx">                 // Check the site option
</span><span class="cx">                 $this-&gt;assertEquals( 1, get_site_option( 'can_compress_scripts' ) );
</span><span class="cx">         }
</span><span class="lines">@@ -152,7 +152,7 @@
</span><span class="cx">          * Set the 'can_compress_scripts' site option to false
</span><span class="cx">          */
</span><span class="cx">         public function test_set_no() {
</span><del>-                
</del><ins>+
</ins><span class="cx">                 // Become an administrator
</span><span class="cx">                 $this-&gt;_setRole( 'administrator' );
</span><span class="cx"> 
</span><span class="lines">@@ -161,25 +161,25 @@
</span><span class="cx"> 
</span><span class="cx">                 // Set the option to true
</span><span class="cx">                 update_site_option( 'can_compress_scripts', 1 );
</span><del>-                
</del><ins>+
</ins><span class="cx">                 // Make the request
</span><span class="cx">                 try {
</span><span class="cx">                         $this-&gt;_handleAjax( 'wp-compression-test' );
</span><span class="cx">                 } catch ( WPAjaxDieStopException $e ) {
</span><span class="cx">                         unset( $e );
</span><span class="cx">                 }
</span><del>-                
</del><ins>+
</ins><span class="cx">                 // Check the site option
</span><span class="cx">                 $this-&gt;assertEquals( 0, get_site_option( 'can_compress_scripts' ) );
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         /**
</span><span class="cx">          * Undo gzencode.  This is ugly, but there's no stock gzdecode() function.
</span><span class="cx">          * @param string $encoded_data
</span><span class="cx">          * @return string
</span><span class="cx">          */
</span><span class="cx">         protected function _gzdecode( $encoded_data ) {
</span><del>-                
</del><ins>+
</ins><span class="cx">                 // Save the encoded data to a temp file
</span><span class="cx">                 $file = wp_tempnam( 'gzdecode' );
</span><span class="cx">                 file_put_contents( $file, $encoded_data );
</span><span class="lines">@@ -188,7 +188,7 @@
</span><span class="cx">                 ob_start();
</span><span class="cx">                 readgzfile( $file );
</span><span class="cx">                 unlink( $file );
</span><del>-                
</del><ins>+
</ins><span class="cx">                 // Save the data stop buffering
</span><span class="cx">                 $data = ob_get_clean();
</span><span class="cx">                 ob_end_clean();
</span></span></pre></div>
<a id="trunktestsajaxDeleteCommentphp"></a>
<div class="modfile"><h4>Modified: trunk/tests/ajax/DeleteComment.php (966 => 967)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/tests/ajax/DeleteComment.php        2012-08-13 21:06:12 UTC (rev 966)
+++ trunk/tests/ajax/DeleteComment.php        2012-08-13 21:07:27 UTC (rev 967)
</span><span class="lines">@@ -42,7 +42,7 @@
</span><span class="cx">                 unset($_POST['delete']);
</span><span class="cx">                 $this-&gt;_last_response = '';
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         /***********************************************************/
</span><span class="cx">         /** Test prototype
</span><span class="cx">     /***********************************************************/
</span><span class="lines">@@ -58,7 +58,7 @@
</span><span class="cx"> 
</span><span class="cx">                 // Reset request
</span><span class="cx">                 $this-&gt;_clear_post_action();
</span><del>-                
</del><ins>+
</ins><span class="cx">                 // Become an administrator
</span><span class="cx">                 $this-&gt;_setRole( 'administrator' );
</span><span class="cx"> 
</span><span class="lines">@@ -70,7 +70,7 @@
</span><span class="cx">                 $_POST['_per_page']   = 100;
</span><span class="cx">                 $_POST['_page']       = 1;
</span><span class="cx">                 $_POST['_url']        = admin_url( 'edit-comments.php' );
</span><del>-                
</del><ins>+
</ins><span class="cx">                 // Make the request
</span><span class="cx">                 try {
</span><span class="cx">                         $this-&gt;_handleAjax( 'delete-comment' );
</span><span class="lines">@@ -80,13 +80,13 @@
</span><span class="cx"> 
</span><span class="cx">                 // Get the response
</span><span class="cx">                 $xml = simplexml_load_string( $this-&gt;_last_response, 'SimpleXMLElement', LIBXML_NOCDATA );
</span><del>-                
</del><ins>+
</ins><span class="cx">                 // Ensure everything is correct
</span><span class="cx">                 $this-&gt;assertEquals( $comment-&gt;comment_ID, (string) $xml-&gt;response[0]-&gt;comment['id'] );
</span><span class="cx">                 $this-&gt;assertEquals( 'delete-comment_' . $comment-&gt;comment_ID, (string) $xml-&gt;response['action'] );
</span><span class="cx">                 $this-&gt;assertGreaterThanOrEqual( time() - 10, (int) $xml-&gt;response[0]-&gt;comment[0]-&gt;supplemental[0]-&gt;time[0] );
</span><span class="cx">                 $this-&gt;assertLessThanOrEqual( time(), (int) $xml-&gt;response[0]-&gt;comment[0]-&gt;supplemental[0]-&gt;time[0] );
</span><del>-                
</del><ins>+
</ins><span class="cx">                 // trash, spam, delete should make the total go down
</span><span class="cx">                 if ( in_array( $action, array( 'trash', 'spam', 'delete' ) ) ) {
</span><span class="cx">                         $total = $_POST['_total'] - 1;
</span><span class="lines">@@ -95,7 +95,7 @@
</span><span class="cx">                 } elseif ( in_array( $action, array( 'untrash', 'unspam' ) ) ) {
</span><span class="cx">                         $total = $_POST['_total'] + 1;
</span><span class="cx">                 }
</span><del>-                
</del><ins>+
</ins><span class="cx">                 // The total is calculated based on a page break -OR- a random number.  Let's look for both possible outcomes
</span><span class="cx">                 $comment_count = wp_count_comments( 0 );
</span><span class="cx">                 $recalc_total = $comment_count-&gt;total_comments;
</span><span class="lines">@@ -103,7 +103,7 @@
</span><span class="cx">                 // Check for either possible total
</span><span class="cx">                 $this-&gt;assertTrue( in_array( (int) $xml-&gt;response[0]-&gt;comment[0]-&gt;supplemental[0]-&gt;total[0] , array( $total, $recalc_total ) ) );
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         /**
</span><span class="cx">          * Test as a non-privileged user (subscriber)
</span><span class="cx">          * Expects test to fail
</span><span class="lines">@@ -112,11 +112,11 @@
</span><span class="cx">          * @return void
</span><span class="cx">          */
</span><span class="cx">         public function _test_as_subscriber( $comment, $action ) {
</span><del>-                
</del><ins>+
</ins><span class="cx">                 // Reset request
</span><span class="cx">                 $this-&gt;_clear_post_action();
</span><del>-                
-                // Become a subscriber                
</del><ins>+
+                // Become a subscriber
</ins><span class="cx">                 $this-&gt;_setRole( 'subscriber' );
</span><span class="cx"> 
</span><span class="cx">                 // Set up the $_POST request
</span><span class="lines">@@ -133,7 +133,7 @@
</span><span class="cx">                 $this-&gt;_handleAjax( 'delete-comment' );
</span><span class="cx">         }
</span><span class="cx"> 
</span><del>-        
</del><ins>+
</ins><span class="cx">         /**
</span><span class="cx">          * Test with a bad nonce
</span><span class="cx">          * Expects test to fail
</span><span class="lines">@@ -142,11 +142,11 @@
</span><span class="cx">          * @return void
</span><span class="cx">          */
</span><span class="cx">         public function _test_with_bad_nonce( $comment, $action ) {
</span><del>-                
</del><ins>+
</ins><span class="cx">                 // Reset request
</span><span class="cx">                 $this-&gt;_clear_post_action();
</span><del>-                
-                // Become a subscriber                
</del><ins>+
+                // Become a subscriber
</ins><span class="cx">                 $this-&gt;_setRole( 'administrator' );
</span><span class="cx"> 
</span><span class="cx">                 // Set up the $_POST request
</span><span class="lines">@@ -171,11 +171,11 @@
</span><span class="cx">          * @return void
</span><span class="cx">          */
</span><span class="cx">         public function _test_with_bad_id( $comment, $action ) {
</span><del>-                
</del><ins>+
</ins><span class="cx">                 // Reset request
</span><span class="cx">                 $this-&gt;_clear_post_action();
</span><del>-                
-                // Become a subscriber                
</del><ins>+
+                // Become a subscriber
</ins><span class="cx">                 $this-&gt;_setRole( 'administrator' );
</span><span class="cx"> 
</span><span class="cx">                 // Set up the $_POST request
</span><span class="lines">@@ -210,8 +210,8 @@
</span><span class="cx"> 
</span><span class="cx">                 // Reset request
</span><span class="cx">                 $this-&gt;_clear_post_action();
</span><del>-                
-                // Become a subscriber                
</del><ins>+
+                // Become a subscriber
</ins><span class="cx">                 $this-&gt;_setRole( 'administrator' );
</span><span class="cx"> 
</span><span class="cx">                 // Set up the $_POST request
</span><span class="lines">@@ -238,7 +238,7 @@
</span><span class="cx"> 
</span><span class="cx">                 // Make the request again, look for a timestamp in the exception
</span><span class="cx">                 try {
</span><del>-                        $this-&gt;_handleAjax( 'delete-comment' );                        
</del><ins>+                        $this-&gt;_handleAjax( 'delete-comment' );
</ins><span class="cx">                         $this-&gt;fail( 'Expected exception: WPAjaxDieStopException' );
</span><span class="cx">                 } catch ( WPAjaxDieStopException $e ) {
</span><span class="cx">                         $this-&gt;assertEquals( 10, strlen( $e-&gt;getMessage() ) );
</span><span class="lines">@@ -274,17 +274,17 @@
</span><span class="cx">          * @return void
</span><span class="cx">          */
</span><span class="cx">         public function test_ajax_comment_trash_actions_as_subscriber() {
</span><del>-        
</del><ins>+
</ins><span class="cx">                 // Test trash/untrash
</span><span class="cx">                 $comment = array_pop( $this-&gt;_comments );
</span><span class="cx">                 $this-&gt;_test_as_subscriber( $comment, 'trash' );
</span><span class="cx">                 $this-&gt;_test_as_subscriber( $comment, 'untrash' );
</span><del>-                
</del><ins>+
</ins><span class="cx">                 // Test spam/unspam
</span><span class="cx">                 $comment = array_pop( $this-&gt;_comments );
</span><span class="cx">                 $this-&gt;_test_as_subscriber( $comment, 'spam' );
</span><span class="cx">                 $this-&gt;_test_as_subscriber( $comment, 'unspam' );
</span><del>-                
</del><ins>+
</ins><span class="cx">                 // Test delete
</span><span class="cx">                 $comment = array_pop( $this-&gt;_comments );
</span><span class="cx">                 $this-&gt;_test_as_subscriber( $comment, 'delete' );
</span><span class="lines">@@ -295,17 +295,17 @@
</span><span class="cx">          * @return void
</span><span class="cx">          */
</span><span class="cx">         public function test_ajax_trash_comment_no_id() {
</span><del>-        
</del><ins>+
</ins><span class="cx">                 // Test trash/untrash
</span><span class="cx">                 $comment = array_pop( $this-&gt;_comments );
</span><span class="cx">                 $this-&gt;_test_as_admin( $comment, 'trash' );
</span><span class="cx">                 $this-&gt;_test_as_admin( $comment, 'untrash' );
</span><del>-                
</del><ins>+
</ins><span class="cx">                 // Test spam/unspam
</span><span class="cx">                 $comment = array_pop( $this-&gt;_comments );
</span><span class="cx">                 $this-&gt;_test_as_admin( $comment, 'spam' );
</span><span class="cx">                 $this-&gt;_test_as_admin( $comment, 'unspam' );
</span><del>-                
</del><ins>+
</ins><span class="cx">                 // Test delete
</span><span class="cx">                 $comment = array_pop( $this-&gt;_comments );
</span><span class="cx">                 $this-&gt;_test_as_admin( $comment, 'delete' );
</span><span class="lines">@@ -321,12 +321,12 @@
</span><span class="cx">                 $comment = array_pop( $this-&gt;_comments );
</span><span class="cx">                 $this-&gt;_test_with_bad_nonce( $comment, 'trash' );
</span><span class="cx">                 $this-&gt;_test_with_bad_nonce( $comment, 'untrash' );
</span><del>-                
</del><ins>+
</ins><span class="cx">                 // Test spam/unspam
</span><span class="cx">                 $comment = array_pop( $this-&gt;_comments );
</span><span class="cx">                 $this-&gt;_test_with_bad_nonce( $comment, 'spam' );
</span><span class="cx">                 $this-&gt;_test_with_bad_nonce( $comment, 'unspam' );
</span><del>-                
</del><ins>+
</ins><span class="cx">                 // Test delete
</span><span class="cx">                 $comment = array_pop( $this-&gt;_comments );
</span><span class="cx">                 $this-&gt;_test_with_bad_nonce( $comment, 'delete' );
</span><span class="lines">@@ -342,12 +342,12 @@
</span><span class="cx">                 $comment = array_pop( $this-&gt;_comments );
</span><span class="cx">                 $this-&gt;_test_double_action( $comment, 'trash' );
</span><span class="cx">                 $this-&gt;_test_double_action( $comment, 'untrash' );
</span><del>-                
</del><ins>+
</ins><span class="cx">                 // Test spam/unspam
</span><span class="cx">                 $comment = array_pop( $this-&gt;_comments );
</span><span class="cx">                 $this-&gt;_test_double_action( $comment, 'spam' );
</span><span class="cx">                 $this-&gt;_test_double_action( $comment, 'unspam' );
</span><del>-                
</del><ins>+
</ins><span class="cx">                 // Test delete
</span><span class="cx">                 $comment = array_pop( $this-&gt;_comments );
</span><span class="cx">                 $this-&gt;_test_double_action( $comment, 'delete' );
</span></span></pre></div>
<a id="trunktestsajaxDimCommentphp"></a>
<div class="modfile"><h4>Modified: trunk/tests/ajax/DimComment.php (966 => 967)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/tests/ajax/DimComment.php        2012-08-13 21:06:12 UTC (rev 966)
+++ trunk/tests/ajax/DimComment.php        2012-08-13 21:07:27 UTC (rev 967)
</span><span class="lines">@@ -39,7 +39,7 @@
</span><span class="cx">                 unset($_POST['new']);
</span><span class="cx">                 $this-&gt;_last_response = '';
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         /***********************************************************/
</span><span class="cx">         /** Test prototype
</span><span class="cx">         /***********************************************************/
</span><span class="lines">@@ -54,7 +54,7 @@
</span><span class="cx"> 
</span><span class="cx">                 // Reset request
</span><span class="cx">                 $this-&gt;_clear_post_action();
</span><del>-                
</del><ins>+
</ins><span class="cx">                 // Become an administrator
</span><span class="cx">                 $this-&gt;_setRole( 'administrator' );
</span><span class="cx"> 
</span><span class="lines">@@ -65,7 +65,7 @@
</span><span class="cx">                 $_POST['_per_page']   = 100;
</span><span class="cx">                 $_POST['_page']       = 1;
</span><span class="cx">                 $_POST['_url']        = admin_url( 'edit-comments.php' );
</span><del>-                
</del><ins>+
</ins><span class="cx">                 // Save the comment status
</span><span class="cx">                 $prev_status          = wp_get_comment_status( $comment-&gt;comment_ID );
</span><span class="cx"> 
</span><span class="lines">@@ -92,18 +92,18 @@
</span><span class="cx">                 } else {
</span><span class="cx">                         $this-&gt;assertEquals( 'unapproved', $current );
</span><span class="cx">                 }
</span><del>-                
</del><ins>+
</ins><span class="cx">                 // The total is calculated based on a page break -OR- a random number.  Let's look for both possible outcomes
</span><span class="cx">                 $comment_count = wp_count_comments( 0 );
</span><span class="cx">                 $recalc_total = $comment_count-&gt;total_comments;
</span><del>-                
</del><ins>+
</ins><span class="cx">                 // Delta is not specified, it will always be 1 lower than the request
</span><span class="cx">                 $total = $_POST['_total'] - 1;
</span><span class="cx"> 
</span><span class="cx">                 // Check for either possible total
</span><span class="cx">                 $this-&gt;assertTrue( in_array( (int) $xml-&gt;response[0]-&gt;comment[0]-&gt;supplemental[0]-&gt;total[0] , array( $total, $recalc_total ) ) );
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         /**
</span><span class="cx">          * Test as a non-privileged user (subscriber)
</span><span class="cx">          * Expects test to fail
</span><span class="lines">@@ -111,11 +111,11 @@
</span><span class="cx">          * @return void
</span><span class="cx">          */
</span><span class="cx">         public function _test_as_subscriber( $comment ) {
</span><del>-                
</del><ins>+
</ins><span class="cx">                 // Reset request
</span><span class="cx">                 $this-&gt;_clear_post_action();
</span><del>-                
-                // Become a subscriber                
</del><ins>+
+                // Become a subscriber
</ins><span class="cx">                 $this-&gt;_setRole( 'subscriber' );
</span><span class="cx"> 
</span><span class="cx">                 // Set up the $_POST request
</span><span class="lines">@@ -130,7 +130,7 @@
</span><span class="cx">                 $this-&gt;setExpectedException( 'WPAjaxDieStopException', '-1' );
</span><span class="cx">                 $this-&gt;_handleAjax( 'dim-comment' );
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         /**
</span><span class="cx">          * Test with a bad nonce
</span><span class="cx">          * Expects test to fail
</span><span class="lines">@@ -138,11 +138,11 @@
</span><span class="cx">          * @return void
</span><span class="cx">          */
</span><span class="cx">         public function _test_with_bad_nonce( $comment ) {
</span><del>-                
</del><ins>+
</ins><span class="cx">                 // Reset request
</span><span class="cx">                 $this-&gt;_clear_post_action();
</span><del>-                
-                // Become a subscriber                
</del><ins>+
+                // Become a subscriber
</ins><span class="cx">                 $this-&gt;_setRole( 'administrator' );
</span><span class="cx"> 
</span><span class="cx">                 // Set up the $_POST request
</span><span class="lines">@@ -165,11 +165,11 @@
</span><span class="cx">          * @return void
</span><span class="cx">          */
</span><span class="cx">         public function test_with_bad_id( $comment ) {
</span><del>-                
</del><ins>+
</ins><span class="cx">                 // Reset request
</span><span class="cx">                 $this-&gt;_clear_post_action();
</span><del>-                
-                // Become a subscriber                
</del><ins>+
+                // Become a subscriber
</ins><span class="cx">                 $this-&gt;_setRole( 'administrator' );
</span><span class="cx"> 
</span><span class="cx">                 // Set up the $_POST request
</span><span class="lines">@@ -233,6 +233,6 @@
</span><span class="cx">          */
</span><span class="cx">         public function test_ajax_dim_comment_bad_nonce() {
</span><span class="cx">                 $comment = array_pop( $this-&gt;_comments );
</span><del>-                $this-&gt;_test_with_bad_nonce( $comment );                
</del><ins>+                $this-&gt;_test_with_bad_nonce( $comment );
</ins><span class="cx">         }
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunktestsajaxEditCommentphp"></a>
<div class="modfile"><h4>Modified: trunk/tests/ajax/EditComment.php (966 => 967)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/tests/ajax/EditComment.php        2012-08-13 21:06:12 UTC (rev 966)
+++ trunk/tests/ajax/EditComment.php        2012-08-13 21:07:27 UTC (rev 967)
</span><span class="lines">@@ -66,10 +66,10 @@
</span><span class="cx">                 $this-&gt;assertEquals( -1, (string) $xml-&gt;response[0]-&gt;edit_comment['position'] );
</span><span class="cx">                 $this-&gt;assertEquals( $comment-&gt;comment_ID, (string) $xml-&gt;response[0]-&gt;edit_comment['id'] );
</span><span class="cx">                 $this-&gt;assertEquals( 'edit-comment_' . $comment-&gt;comment_ID, (string) $xml-&gt;response['action'] );
</span><del>-                
</del><ins>+
</ins><span class="cx">                 // Check the payload
</span><span class="cx">                 $this-&gt;assertNotEmpty( (string) $xml-&gt;response[0]-&gt;edit_comment[0]-&gt;response_data );
</span><del>-                
</del><ins>+
</ins><span class="cx">                 // And supplemental is empty
</span><span class="cx">                 $this-&gt;assertEmpty( (string) $xml-&gt;response[0]-&gt;edit_comment[0]-&gt;supplemental );
</span><span class="cx">         }
</span><span class="lines">@@ -115,7 +115,7 @@
</span><span class="cx">                         'post_id' =&gt; $this-&gt;_comment_post-&gt;ID
</span><span class="cx">                 ) );
</span><span class="cx">                 $comment = array_pop( $comments );
</span><del>-                
</del><ins>+
</ins><span class="cx">                 // Set up a default request
</span><span class="cx">                 $_POST['_ajax_nonce-replyto-comment'] = wp_create_nonce( uniqid() );
</span><span class="cx">                 $_POST['comment_ID']                  = $comment-&gt;comment_ID;
</span></span></pre></div>
<a id="trunktestsajaxGetCommentsphp"></a>
<div class="modfile"><h4>Modified: trunk/tests/ajax/GetComments.php (966 => 967)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/tests/ajax/GetComments.php        2012-08-13 21:06:12 UTC (rev 966)
+++ trunk/tests/ajax/GetComments.php        2012-08-13 21:07:27 UTC (rev 967)
</span><span class="lines">@@ -20,7 +20,7 @@
</span><span class="cx">          * @var mixed
</span><span class="cx">          */
</span><span class="cx">         protected $_comment_post = null;
</span><del>-        
</del><ins>+
</ins><span class="cx">         /**
</span><span class="cx">          * A post with no comments
</span><span class="cx">          * @var mixed
</span><span class="lines">@@ -54,7 +54,7 @@
</span><span class="cx">                 $_POST['_ajax_nonce'] = wp_create_nonce( 'get-comments' );
</span><span class="cx">                 $_POST['action']      = 'get-comments';
</span><span class="cx">                 $_POST['p']           = $this-&gt;_comment_post-&gt;ID;
</span><del>-                
</del><ins>+
</ins><span class="cx">                 // Make the request
</span><span class="cx">                 try {
</span><span class="cx">                         $this-&gt;_handleAjax( 'get-comments' );
</span><span class="lines">@@ -69,10 +69,10 @@
</span><span class="cx">                 $this-&gt;assertEquals( 1, (string) $xml-&gt;response[0]-&gt;comments['position'] );
</span><span class="cx">                 $this-&gt;assertEquals( 0, (string) $xml-&gt;response[0]-&gt;comments['id'] );
</span><span class="cx">                 $this-&gt;assertEquals( 'get-comments_0', (string) $xml-&gt;response['action'] );
</span><del>-                
</del><ins>+
</ins><span class="cx">                 // Check the payload
</span><span class="cx">                 $this-&gt;assertNotEmpty( (string) $xml-&gt;response[0]-&gt;comments[0]-&gt;response_data );
</span><del>-                
</del><ins>+
</ins><span class="cx">                 // And supplemental is empty
</span><span class="cx">                 $this-&gt;assertEmpty( (string) $xml-&gt;response[0]-&gt;comments[0]-&gt;supplemental );
</span><span class="cx">         }
</span><span class="lines">@@ -84,7 +84,7 @@
</span><span class="cx">          */
</span><span class="cx">         public function test_as_subscriber() {
</span><span class="cx"> 
</span><del>-                // Become a subscriber                
</del><ins>+                // Become a subscriber
</ins><span class="cx">                 $this-&gt;_setRole( 'subscriber' );
</span><span class="cx"> 
</span><span class="cx">                 // Set up a default request
</span></span></pre></div>
<a id="trunktestsajaxReplytoCommentphp"></a>
<div class="modfile"><h4>Modified: trunk/tests/ajax/ReplytoComment.php (966 => 967)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/tests/ajax/ReplytoComment.php        2012-08-13 21:06:12 UTC (rev 966)
+++ trunk/tests/ajax/ReplytoComment.php        2012-08-13 21:07:27 UTC (rev 967)
</span><span class="lines">@@ -157,7 +157,7 @@
</span><span class="cx">                 $this-&gt;setExpectedException( 'WPAjaxDieStopException', '-1' );
</span><span class="cx">                 $this-&gt;_handleAjax( 'replyto-comment' );
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         /**
</span><span class="cx">          * Reply to a draft post
</span><span class="cx">          * Expects test to fail
</span><span class="lines">@@ -177,7 +177,7 @@
</span><span class="cx">                 $this-&gt;setExpectedException( 'WPAjaxDieStopException', 'ERROR: you are replying to a comment on a draft post.' );
</span><span class="cx">                 $this-&gt;_handleAjax( 'replyto-comment' );
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         /**
</span><span class="cx">          * Reply to a post with a simulated database failure
</span><span class="cx">          * Expects test to fail
</span><span class="lines">@@ -209,7 +209,7 @@
</span><span class="cx">                         $this-&gt;assertContains( '1', $e-&gt;getMessage() );
</span><span class="cx">                 }
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         /**
</span><span class="cx">          * Block comments from being saved
</span><span class="cx">          * @param string $sql
</span></span></pre></div>
<a id="trunktestsajaxTagSearchphp"></a>
<div class="modfile"><h4>Modified: trunk/tests/ajax/TagSearch.php (966 => 967)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/tests/ajax/TagSearch.php        2012-08-13 21:06:12 UTC (rev 966)
+++ trunk/tests/ajax/TagSearch.php        2012-08-13 21:07:27 UTC (rev 967)
</span><span class="lines">@@ -52,7 +52,7 @@
</span><span class="cx">                 } catch ( WPAjaxDieContinueException $e ) {
</span><span class="cx">                         unset( $e );
</span><span class="cx">                 }
</span><del>-                
</del><ins>+
</ins><span class="cx">                 // Ensure we found the right match
</span><span class="cx">                 $this-&gt;assertEquals( $this-&gt;_last_response, 'chattels' );
</span><span class="cx">         }
</span><span class="lines">@@ -93,7 +93,7 @@
</span><span class="cx">                 } catch ( WPAjaxDieContinueException $e ) {
</span><span class="cx">                         unset( $e );
</span><span class="cx">                 }
</span><del>-                
</del><ins>+
</ins><span class="cx">                 // Ensure we found the right match
</span><span class="cx">                 $this-&gt;assertEquals( $this-&gt;_last_response, 'chattels' );
</span><span class="cx">         }
</span><span class="lines">@@ -105,14 +105,14 @@
</span><span class="cx"> 
</span><span class="cx">                 // Log out
</span><span class="cx">                 wp_logout();
</span><del>-                
</del><ins>+
</ins><span class="cx">                 // Set up a default request
</span><span class="cx">                 $_GET['tax'] = 'post_tag';
</span><span class="cx">                 $_GET['q']   = 'chat';
</span><span class="cx"> 
</span><span class="cx">                 // Make the request
</span><span class="cx">                 $this-&gt;setExpectedException( 'WPAjaxDieStopException', '-1' );
</span><del>-                $this-&gt;_handleAjax( 'ajax-tag-search' );                
</del><ins>+                $this-&gt;_handleAjax( 'ajax-tag-search' );
</ins><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         /**
</span><span class="lines">@@ -129,9 +129,9 @@
</span><span class="cx"> 
</span><span class="cx">                 // Make the request
</span><span class="cx">                 $this-&gt;setExpectedException( 'WPAjaxDieStopException', '0' );
</span><del>-                $this-&gt;_handleAjax( 'ajax-tag-search' );                
</del><ins>+                $this-&gt;_handleAjax( 'ajax-tag-search' );
</ins><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         /**
</span><span class="cx">          * Test as an unprivileged user
</span><span class="cx">          */
</span><span class="lines">@@ -146,7 +146,7 @@
</span><span class="cx"> 
</span><span class="cx">                 // Make the request
</span><span class="cx">                 $this-&gt;setExpectedException( 'WPAjaxDieStopException', '-1' );
</span><del>-                $this-&gt;_handleAjax( 'ajax-tag-search' );                
</del><ins>+                $this-&gt;_handleAjax( 'ajax-tag-search' );
</ins><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunktestsuserphp"></a>
<div class="modfile"><h4>Modified: trunk/tests/user.php (966 => 967)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/tests/user.php        2012-08-13 21:06:12 UTC (rev 966)
+++ trunk/tests/user.php        2012-08-13 21:07:27 UTC (rev 967)
</span><span class="lines">@@ -248,7 +248,7 @@
</span><span class="cx">                 $user = new WP_User( $user_id );
</span><span class="cx">                 $this-&gt;assertInstanceOf( 'WP_User', $user );
</span><span class="cx">                 $this-&gt;assertEquals( $user_id, $user-&gt;ID );
</span><del>-                
</del><ins>+
</ins><span class="cx">                 $user2 = new WP_User( 0,  $user-&gt;user_login );
</span><span class="cx">                 $this-&gt;assertInstanceOf( 'WP_User', $user2 );
</span><span class="cx">                 $this-&gt;assertEquals( $user_id, $user2-&gt;ID );
</span></span></pre>
</div>
</div>

</body>
</html>