<!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][883] trunk: Set svn:eol-style to native</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/883">883</a></dd>
<dt>Author</dt> <dd>nbachiyski</dd>
<dt>Date</dt> <dd>2012-07-08 11:20:24 +0000 (Sun, 08 Jul 2012)</dd>
</dl>

<h3>Log Message</h3>
<pre>Set svn:eol-style to native</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkbininstallphp">trunk/bin/install.php</a></li>
<li><a href="#trunkbootstrapphp">trunk/bootstrap.php</a></li>
<li><a href="#trunkdataformattingcrlineendingsfileheaderphp">trunk/data/formatting/cr-line-endings-file-header.php</a></li>
<li><a href="#trunkincludesexceptionsphp">trunk/includes/exceptions.php</a></li>
<li><a href="#trunkincludesfactoryphp">trunk/includes/factory.php</a></li>
<li><a href="#trunkincludesfunctionsphp">trunk/includes/functions.php</a></li>
<li><a href="#trunkincludestestcasexmlrpcphp">trunk/includes/testcase-xmlrpc.php</a></li>
<li><a href="#trunkincludestestcasephp">trunk/includes/testcase.php</a></li>
<li><a href="#trunkincludestracphp">trunk/includes/trac.php</a></li>
<li><a href="#trunkteststestxmlrpcapitest_mt_getRecentPostTitlesphp">trunk/tests/test-xmlrpc-api/test_mt_getRecentPostTitles.php</a></li>
<li><a href="#trunkteststestxmlrpcapitest_mw_getPostphp">trunk/tests/test-xmlrpc-api/test_mw_getPost.php</a></li>
<li><a href="#trunkteststestxmlrpcapitest_mw_getRecentPostsphp">trunk/tests/test-xmlrpc-api/test_mw_getRecentPosts.php</a></li>
<li><a href="#trunkteststestxmlrpcapitest_wp_deletePostphp">trunk/tests/test-xmlrpc-api/test_wp_deletePost.php</a></li>
<li><a href="#trunkteststestxmlrpcapitest_wp_deleteTermphp">trunk/tests/test-xmlrpc-api/test_wp_deleteTerm.php</a></li>
<li><a href="#trunkteststestxmlrpcapitest_wp_getCommentphp">trunk/tests/test-xmlrpc-api/test_wp_getComment.php</a></li>
<li><a href="#trunkteststestxmlrpcapitest_wp_getCommentsphp">trunk/tests/test-xmlrpc-api/test_wp_getComments.php</a></li>
<li><a href="#trunkteststestxmlrpcapitest_wp_getMediaItemphp">trunk/tests/test-xmlrpc-api/test_wp_getMediaItem.php</a></li>
<li><a href="#trunkteststestxmlrpcapitest_wp_getPagephp">trunk/tests/test-xmlrpc-api/test_wp_getPage.php</a></li>
<li><a href="#trunkteststestxmlrpcapitest_wp_getPageListphp">trunk/tests/test-xmlrpc-api/test_wp_getPageList.php</a></li>
<li><a href="#trunkteststestxmlrpcapitest_wp_getPagesphp">trunk/tests/test-xmlrpc-api/test_wp_getPages.php</a></li>
<li><a href="#trunkteststestxmlrpcapitest_wp_getPostphp">trunk/tests/test-xmlrpc-api/test_wp_getPost.php</a></li>
<li><a href="#trunkteststestxmlrpcapitest_wp_getPostTypephp">trunk/tests/test-xmlrpc-api/test_wp_getPostType.php</a></li>
<li><a href="#trunkteststestxmlrpcapitest_wp_getPostTypesphp">trunk/tests/test-xmlrpc-api/test_wp_getPostTypes.php</a></li>
<li><a href="#trunkteststestxmlrpcapitest_wp_getPostsphp">trunk/tests/test-xmlrpc-api/test_wp_getPosts.php</a></li>
<li><a href="#trunkteststestxmlrpcapitest_wp_getTaxonomiesphp">trunk/tests/test-xmlrpc-api/test_wp_getTaxonomies.php</a></li>
<li><a href="#trunkteststestxmlrpcapitest_wp_getTaxonomyphp">trunk/tests/test-xmlrpc-api/test_wp_getTaxonomy.php</a></li>
<li><a href="#trunkteststestxmlrpcapitest_wp_getTermphp">trunk/tests/test-xmlrpc-api/test_wp_getTerm.php</a></li>
<li><a href="#trunkteststestxmlrpcapitest_wp_getTermsphp">trunk/tests/test-xmlrpc-api/test_wp_getTerms.php</a></li>
<li><a href="#trunkteststestxmlrpcapitest_wp_uploadFilephp">trunk/tests/test-xmlrpc-api/test_wp_uploadFile.php</a></li>
<li><a href="#trunkwptestsconfigsamplephp">trunk/wp-tests-config-sample.php</a></li>
</ul>

<h3>Property Changed</h3>
<ul>
<li><a href="#trunkbininstallphp">trunk/bin/install.php</a></li>
<li><a href="#trunkbootstrapphp">trunk/bootstrap.php</a></li>
<li><a href="#trunkdataformattingcrlineendingsfileheaderphp">trunk/data/formatting/cr-line-endings-file-header.php</a></li>
<li><a href="#trunkdatathemedir1defaultfunctionsphp">trunk/data/themedir1/default/functions.php</a></li>
<li><a href="#trunkdatathemedir1defaultindexphp">trunk/data/themedir1/default/index.php</a></li>
<li><a href="#trunkdatathemedir1pagetemplatesindexphp">trunk/data/themedir1/page-templates/index.php</a></li>
<li><a href="#trunkdatathemedir1pagetemplatessubdirtemplatesubdirphp">trunk/data/themedir1/page-templates/subdir/template-sub-dir.php</a></li>
<li><a href="#trunkdatathemedir1pagetemplatestemplateheaderphp">trunk/data/themedir1/page-templates/template-header.php</a></li>
<li><a href="#trunkdatathemedir1pagetemplatestemplatetoplevelphp">trunk/data/themedir1/page-templates/template-top-level.php</a></li>
<li><a href="#trunkdatathemedir1sandboxfunctionsphp">trunk/data/themedir1/sandbox/functions.php</a></li>
<li><a href="#trunkdatathemedir1sandboxindexphp">trunk/data/themedir1/sandbox/index.php</a></li>
<li><a href="#trunkdatathemedir1subdirtheme2functionsphp">trunk/data/themedir1/subdir/theme2/functions.php</a></li>
<li><a href="#trunkdatathemedir1subdirtheme2indexphp">trunk/data/themedir1/subdir/theme2/index.php</a></li>
<li><a href="#trunkdatathemedir1theme1functionsphp">trunk/data/themedir1/theme1/functions.php</a></li>
<li><a href="#trunkdatathemedir1theme1indexphp">trunk/data/themedir1/theme1/index.php</a></li>
<li><a href="#trunkdatathemedir1theme1dupefunctionsphp">trunk/data/themedir1/theme1-dupe/functions.php</a></li>
<li><a href="#trunkdatathemedir1theme1dupeindexphp">trunk/data/themedir1/theme1-dupe/index.php</a></li>
<li><a href="#trunkincludesexceptionsphp">trunk/includes/exceptions.php</a></li>
<li><a href="#trunkincludesfactoryphp">trunk/includes/factory.php</a></li>
<li><a href="#trunkincludesfunctionsphp">trunk/includes/functions.php</a></li>
<li><a href="#trunkincludestestcasexmlrpcphp">trunk/includes/testcase-xmlrpc.php</a></li>
<li><a href="#trunkincludestestcasephp">trunk/includes/testcase.php</a></li>
<li><a href="#trunkincludestracphp">trunk/includes/trac.php</a></li>
<li><a href="#trunkteststestajaxactionstest_admin_ajax_save_draftphp">trunk/tests/test-ajax-actions/test_admin_ajax_save_draft.php</a></li>
<li><a href="#trunkteststestxmlrpcapitest_mt_getRecentPostTitlesphp">trunk/tests/test-xmlrpc-api/test_mt_getRecentPostTitles.php</a></li>
<li><a href="#trunkteststestxmlrpcapitest_mw_getPostphp">trunk/tests/test-xmlrpc-api/test_mw_getPost.php</a></li>
<li><a href="#trunkteststestxmlrpcapitest_mw_getRecentPostsphp">trunk/tests/test-xmlrpc-api/test_mw_getRecentPosts.php</a></li>
<li><a href="#trunkteststestxmlrpcapitest_wp_deletePostphp">trunk/tests/test-xmlrpc-api/test_wp_deletePost.php</a></li>
<li><a href="#trunkteststestxmlrpcapitest_wp_deleteTermphp">trunk/tests/test-xmlrpc-api/test_wp_deleteTerm.php</a></li>
<li><a href="#trunkteststestxmlrpcapitest_wp_getCommentphp">trunk/tests/test-xmlrpc-api/test_wp_getComment.php</a></li>
<li><a href="#trunkteststestxmlrpcapitest_wp_getCommentsphp">trunk/tests/test-xmlrpc-api/test_wp_getComments.php</a></li>
<li><a href="#trunkteststestxmlrpcapitest_wp_getMediaItemphp">trunk/tests/test-xmlrpc-api/test_wp_getMediaItem.php</a></li>
<li><a href="#trunkteststestxmlrpcapitest_wp_getPagephp">trunk/tests/test-xmlrpc-api/test_wp_getPage.php</a></li>
<li><a href="#trunkteststestxmlrpcapitest_wp_getPageListphp">trunk/tests/test-xmlrpc-api/test_wp_getPageList.php</a></li>
<li><a href="#trunkteststestxmlrpcapitest_wp_getPagesphp">trunk/tests/test-xmlrpc-api/test_wp_getPages.php</a></li>
<li><a href="#trunkteststestxmlrpcapitest_wp_getPostphp">trunk/tests/test-xmlrpc-api/test_wp_getPost.php</a></li>
<li><a href="#trunkteststestxmlrpcapitest_wp_getPostTypephp">trunk/tests/test-xmlrpc-api/test_wp_getPostType.php</a></li>
<li><a href="#trunkteststestxmlrpcapitest_wp_getPostTypesphp">trunk/tests/test-xmlrpc-api/test_wp_getPostTypes.php</a></li>
<li><a href="#trunkteststestxmlrpcapitest_wp_getPostsphp">trunk/tests/test-xmlrpc-api/test_wp_getPosts.php</a></li>
<li><a href="#trunkteststestxmlrpcapitest_wp_getTaxonomiesphp">trunk/tests/test-xmlrpc-api/test_wp_getTaxonomies.php</a></li>
<li><a href="#trunkteststestxmlrpcapitest_wp_getTaxonomyphp">trunk/tests/test-xmlrpc-api/test_wp_getTaxonomy.php</a></li>
<li><a href="#trunkteststestxmlrpcapitest_wp_getTermphp">trunk/tests/test-xmlrpc-api/test_wp_getTerm.php</a></li>
<li><a href="#trunkteststestxmlrpcapitest_wp_getTermsphp">trunk/tests/test-xmlrpc-api/test_wp_getTerms.php</a></li>
<li><a href="#trunkteststestxmlrpcapitest_wp_uploadFilephp">trunk/tests/test-xmlrpc-api/test_wp_uploadFile.php</a></li>
<li><a href="#trunkteststest_actions_closuresphp">trunk/tests/test_actions_closures.php</a></li>
<li><a href="#trunkteststest_includes_balance_tagsphp">trunk/tests/test_includes_balance_tags.php</a></li>
<li><a href="#trunkteststest_includes_classwpthemephp">trunk/tests/test_includes_class-wp-theme.php</a></li>
<li><a href="#trunkteststest_includes_mediaphp">trunk/tests/test_includes_media.php</a></li>
<li><a href="#trunkwptestsconfigsamplephp">trunk/wp-tests-config-sample.php</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkbininstallphp"></a>
<div class="modfile"><h4>Modified: trunk/bin/install.php (882 => 883)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bin/install.php        2012-07-08 11:10:15 UTC (rev 882)
+++ trunk/bin/install.php        2012-07-08 11:20:24 UTC (rev 883)
</span><span class="lines">@@ -1,61 +1,61 @@
</span><del>-&lt;?php
-/**
- * Installs WordPress for the purpose of the unit-tests
- *
- * @todo Reuse the init/load code in init.php
- */
-error_reporting( E_ALL &amp; ~E_DEPRECATED &amp; ~E_STRICT );
-
-$config_file_path = $argv[1];
-
-$config_dir = dirname( $config_file_path );
-
-define( 'WP_INSTALLING', true );
-require_once $config_file_path;
-require_once $config_dir . '/includes/functions.php';
-
-$_SERVER['SERVER_PROTOCOL'] = 'HTTP/1.1';
-$_SERVER['HTTP_HOST'] = WP_TESTS_DOMAIN;
-$PHP_SELF = $GLOBALS['PHP_SELF'] = $_SERVER['PHP_SELF'] = '/index.php';
-
-require_once ABSPATH . '/wp-settings.php';
-
-require_once ABSPATH . '/wp-admin/includes/upgrade.php';
-require_once ABSPATH . '/wp-includes/wp-db.php';
-
-define( 'WP_TESTS_VERSION_FILE', ABSPATH . '.wp-tests-version' );
-
-$wpdb-&gt;suppress_errors();
-$installed = $wpdb-&gt;get_var( &quot;SELECT option_value FROM $wpdb-&gt;options WHERE option_name = 'siteurl'&quot; );
-$wpdb-&gt;suppress_errors( false );
-
-$hash = get_option( 'db_version' ) . ' ' . sha1_file( $config_file_path );
-
-if ( $installed &amp;&amp; file_exists( WP_TESTS_VERSION_FILE ) &amp;&amp; file_get_contents( WP_TESTS_VERSION_FILE ) == $hash )
-        return;
-
-$wpdb-&gt;query( 'SET storage_engine = INNODB;' );
-$wpdb-&gt;query( 'DROP DATABASE IF EXISTS '.DB_NAME.&quot;;&quot; );
-$wpdb-&gt;query( 'CREATE DATABASE '.DB_NAME.&quot;;&quot; );
-$wpdb-&gt;select( DB_NAME, $wpdb-&gt;dbh );
-
-echo &quot;Installing…&quot; . PHP_EOL;
-wp_install( WP_TESTS_TITLE, 'admin', WP_TESTS_EMAIL, true, null, 'password' );
-
-if ( defined( 'WP_TESTS_MULTISITE' ) &amp;&amp; WP_TESTS_MULTISITE ) {
-        echo &quot;Installing network…&quot; . PHP_EOL;
-
-        define( 'WP_INSTALLING_NETWORK', true );
-
-        // We need to create references to ms global tables.
-        foreach ( $wpdb-&gt;tables( 'ms_global' ) as $table =&gt; $prefixed_table )
-                $wpdb-&gt;$table = $prefixed_table;
-
-        $title = WP_TESTS_TITLE . ' Network';
-        $subdomain_install = false;
-
-        install_network();
-        populate_network( 1, WP_TESTS_DOMAIN, WP_TESTS_EMAIL, $title, '/', $subdomain_install );
-}
-
-file_put_contents( WP_TESTS_VERSION_FILE, $hash );
</del><ins>+&lt;?php
+/**
+ * Installs WordPress for the purpose of the unit-tests
+ *
+ * @todo Reuse the init/load code in init.php
+ */
+error_reporting( E_ALL &amp; ~E_DEPRECATED &amp; ~E_STRICT );
+
+$config_file_path = $argv[1];
+
+$config_dir = dirname( $config_file_path );
+
+define( 'WP_INSTALLING', true );
+require_once $config_file_path;
+require_once $config_dir . '/includes/functions.php';
+
+$_SERVER['SERVER_PROTOCOL'] = 'HTTP/1.1';
+$_SERVER['HTTP_HOST'] = WP_TESTS_DOMAIN;
+$PHP_SELF = $GLOBALS['PHP_SELF'] = $_SERVER['PHP_SELF'] = '/index.php';
+
+require_once ABSPATH . '/wp-settings.php';
+
+require_once ABSPATH . '/wp-admin/includes/upgrade.php';
+require_once ABSPATH . '/wp-includes/wp-db.php';
+
+define( 'WP_TESTS_VERSION_FILE', ABSPATH . '.wp-tests-version' );
+
+$wpdb-&gt;suppress_errors();
+$installed = $wpdb-&gt;get_var( &quot;SELECT option_value FROM $wpdb-&gt;options WHERE option_name = 'siteurl'&quot; );
+$wpdb-&gt;suppress_errors( false );
+
+$hash = get_option( 'db_version' ) . ' ' . sha1_file( $config_file_path );
+
+if ( $installed &amp;&amp; file_exists( WP_TESTS_VERSION_FILE ) &amp;&amp; file_get_contents( WP_TESTS_VERSION_FILE ) == $hash )
+        return;
+
+$wpdb-&gt;query( 'SET storage_engine = INNODB;' );
+$wpdb-&gt;query( 'DROP DATABASE IF EXISTS '.DB_NAME.&quot;;&quot; );
+$wpdb-&gt;query( 'CREATE DATABASE '.DB_NAME.&quot;;&quot; );
+$wpdb-&gt;select( DB_NAME, $wpdb-&gt;dbh );
+
+echo &quot;Installing…&quot; . PHP_EOL;
+wp_install( WP_TESTS_TITLE, 'admin', WP_TESTS_EMAIL, true, null, 'password' );
+
+if ( defined( 'WP_TESTS_MULTISITE' ) &amp;&amp; WP_TESTS_MULTISITE ) {
+        echo &quot;Installing network…&quot; . PHP_EOL;
+
+        define( 'WP_INSTALLING_NETWORK', true );
+
+        // We need to create references to ms global tables.
+        foreach ( $wpdb-&gt;tables( 'ms_global' ) as $table =&gt; $prefixed_table )
+                $wpdb-&gt;$table = $prefixed_table;
+
+        $title = WP_TESTS_TITLE . ' Network';
+        $subdomain_install = false;
+
+        install_network();
+        populate_network( 1, WP_TESTS_DOMAIN, WP_TESTS_EMAIL, $title, '/', $subdomain_install );
+}
+
+file_put_contents( WP_TESTS_VERSION_FILE, $hash );
</ins><span class="cx">Property changes on: trunk/bin/install.php
</span><span class="cx">___________________________________________________________________
</span></span></pre></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<a id="trunkbootstrapphp"></a>
<div class="modfile"><h4>Modified: trunk/bootstrap.php (882 => 883)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bootstrap.php        2012-07-08 11:10:15 UTC (rev 882)
+++ trunk/bootstrap.php        2012-07-08 11:20:24 UTC (rev 883)
</span><span class="lines">@@ -1,80 +1,80 @@
</span><del>-&lt;?php
-/**
- * Installs WordPress for running the tests and loads WordPress and the test libraries
- */
-
-error_reporting( E_ALL &amp; ~E_DEPRECATED &amp; ~E_STRICT );
-
-require_once 'PHPUnit/Autoload.php';
-
-$config_file_path = dirname( __FILE__ ) . '/wp-tests-config.php';
-
-/*
- * Globalize some WordPress variables, because PHPUnit loads this file inside a function
- * See: https://github.com/sebastianbergmann/phpunit/issues/325
- *
- * These are not needed for WordPress 3.3+, only for older versions
-*/
-global $table_prefix, $wp_embed, $wp_locale, $_wp_deprecated_widgets_callbacks, $wp_widget_factory;
-
-// These are still needed
-global $wpdb, $current_site, $current_blog, $wp_rewrite, $shortcode_tags, $wp;
-
-if ( !is_readable( $config_file_path ) ) {
-        die( &quot;ERROR: wp-test-config.php is missing! Please use wp-test-config-sample.php to create a config file.\n&quot; );
-}
-require_once $config_file_path;
-
-define( 'DIR_TESTDATA', dirname( __FILE__ ) . '/data' );
-
-if ( ! defined( 'WP_TESTS_FORCE_KNOWN_BUGS' ) )
-        define( 'WP_TESTS_FORCE_KNOWN_BUGS', false );
-
-// Cron tries to make an HTTP request to the blog, which always fails, because tests are run in CLI mode only
-define( 'DISABLE_WP_CRON', true );
-
-define( 'WP_MEMORY_LIMIT', -1 );
-define( 'WP_MAX_MEMORY_LIMIT', -1 );
-
-$_SERVER['SERVER_PROTOCOL'] = 'HTTP/1.1';
-$_SERVER['HTTP_HOST'] = WP_TESTS_DOMAIN;
-$PHP_SELF = $GLOBALS['PHP_SELF'] = $_SERVER['PHP_SELF'] = '/index.php';
-
-system( WP_PHP_BINARY . ' ' . escapeshellarg( dirname( __FILE__ ) . '/bin/install.php' ) . ' ' . escapeshellarg( $config_file_path ) );
-
-if ( defined( 'WP_TESTS_MULTISITE' ) &amp;&amp; WP_TESTS_MULTISITE ) {
-        define( 'MULTISITE', true );
-        define( 'SUBDOMAIN_INSTALL', false );
-        define( 'DOMAIN_CURRENT_SITE', WP_TESTS_DOMAIN );
-        define( 'PATH_CURRENT_SITE', '/' );
-        define( 'SITE_ID_CURRENT_SITE', 1 );
-        define( 'BLOG_ID_CURRENT_SITE', 1 );
-        $GLOBALS['base'] = '/';
-}
-
-require dirname( __FILE__ ) . '/includes/functions.php';
-
-// Preset WordPress options defined in bootstrap file.
-// Used to activate themes, plugins, as well as  other settings.
-if(isset($GLOBALS['wp_tests_options'])) {
-        function wp_tests_options( $value ) {
-                $key = substr( current_filter(), strlen( 'pre_option_' ) );
-                return $GLOBALS['wp_tests_options'][$key];
-        }
-
-        foreach ( array_keys( $GLOBALS['wp_tests_options'] ) as $key ) {
-                tests_add_filter( 'pre_option_'.$key, 'wp_tests_options' );
-        }
-}
-
-// Load WordPress
-require_once ABSPATH . '/wp-settings.php';
-
-// Delete any default posts &amp; related data
-_delete_all_posts();
-
-require dirname( __FILE__ ) . '/includes/testcase.php';
-require dirname( __FILE__ ) . '/includes/testcase-xmlrpc.php';
-require dirname( __FILE__ ) . '/includes/testcase-ajax.php';
-require dirname( __FILE__ ) . '/includes/exceptions.php';
-require dirname( __FILE__ ) . '/includes/utils.php';
</del><ins>+&lt;?php
+/**
+ * Installs WordPress for running the tests and loads WordPress and the test libraries
+ */
+
+error_reporting( E_ALL &amp; ~E_DEPRECATED &amp; ~E_STRICT );
+
+require_once 'PHPUnit/Autoload.php';
+
+$config_file_path = dirname( __FILE__ ) . '/wp-tests-config.php';
+
+/*
+ * Globalize some WordPress variables, because PHPUnit loads this file inside a function
+ * See: https://github.com/sebastianbergmann/phpunit/issues/325
+ *
+ * These are not needed for WordPress 3.3+, only for older versions
+*/
+global $table_prefix, $wp_embed, $wp_locale, $_wp_deprecated_widgets_callbacks, $wp_widget_factory;
+
+// These are still needed
+global $wpdb, $current_site, $current_blog, $wp_rewrite, $shortcode_tags, $wp;
+
+if ( !is_readable( $config_file_path ) ) {
+        die( &quot;ERROR: wp-test-config.php is missing! Please use wp-test-config-sample.php to create a config file.\n&quot; );
+}
+require_once $config_file_path;
+
+define( 'DIR_TESTDATA', dirname( __FILE__ ) . '/data' );
+
+if ( ! defined( 'WP_TESTS_FORCE_KNOWN_BUGS' ) )
+        define( 'WP_TESTS_FORCE_KNOWN_BUGS', false );
+
+// Cron tries to make an HTTP request to the blog, which always fails, because tests are run in CLI mode only
+define( 'DISABLE_WP_CRON', true );
+
+define( 'WP_MEMORY_LIMIT', -1 );
+define( 'WP_MAX_MEMORY_LIMIT', -1 );
+
+$_SERVER['SERVER_PROTOCOL'] = 'HTTP/1.1';
+$_SERVER['HTTP_HOST'] = WP_TESTS_DOMAIN;
+$PHP_SELF = $GLOBALS['PHP_SELF'] = $_SERVER['PHP_SELF'] = '/index.php';
+
+system( WP_PHP_BINARY . ' ' . escapeshellarg( dirname( __FILE__ ) . '/bin/install.php' ) . ' ' . escapeshellarg( $config_file_path ) );
+
+if ( defined( 'WP_TESTS_MULTISITE' ) &amp;&amp; WP_TESTS_MULTISITE ) {
+        define( 'MULTISITE', true );
+        define( 'SUBDOMAIN_INSTALL', false );
+        define( 'DOMAIN_CURRENT_SITE', WP_TESTS_DOMAIN );
+        define( 'PATH_CURRENT_SITE', '/' );
+        define( 'SITE_ID_CURRENT_SITE', 1 );
+        define( 'BLOG_ID_CURRENT_SITE', 1 );
+        $GLOBALS['base'] = '/';
+}
+
+require dirname( __FILE__ ) . '/includes/functions.php';
+
+// Preset WordPress options defined in bootstrap file.
+// Used to activate themes, plugins, as well as  other settings.
+if(isset($GLOBALS['wp_tests_options'])) {
+        function wp_tests_options( $value ) {
+                $key = substr( current_filter(), strlen( 'pre_option_' ) );
+                return $GLOBALS['wp_tests_options'][$key];
+        }
+
+        foreach ( array_keys( $GLOBALS['wp_tests_options'] ) as $key ) {
+                tests_add_filter( 'pre_option_'.$key, 'wp_tests_options' );
+        }
+}
+
+// Load WordPress
+require_once ABSPATH . '/wp-settings.php';
+
+// Delete any default posts &amp; related data
+_delete_all_posts();
+
+require dirname( __FILE__ ) . '/includes/testcase.php';
+require dirname( __FILE__ ) . '/includes/testcase-xmlrpc.php';
+require dirname( __FILE__ ) . '/includes/testcase-ajax.php';
+require dirname( __FILE__ ) . '/includes/exceptions.php';
+require dirname( __FILE__ ) . '/includes/utils.php';
</ins><span class="cx">Property changes on: trunk/bootstrap.php
</span><span class="cx">___________________________________________________________________
</span></span></pre></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<a id="trunkdataformattingcrlineendingsfileheaderphp"></a>
<div class="modfile"><h4>Modified: trunk/data/formatting/cr-line-endings-file-header.php (882 => 883)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/data/formatting/cr-line-endings-file-header.php        2012-07-08 11:10:15 UTC (rev 882)
+++ trunk/data/formatting/cr-line-endings-file-header.php        2012-07-08 11:20:24 UTC (rev 883)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><del>-&lt;?php -/* Some Header: Some header value! - * Description: This file is using CR line endings for a testcase. - * Author: A Very Old Mac - */ +&lt;?php
</del><ins>+/* Some Header: Some header value!
+ * Description: This file is using CR line endings for a testcase.
+ * Author: A Very Old Mac
+ */
</ins><span class="cx">Property changes on: trunk/data/formatting/cr-line-endings-file-header.php
</span><span class="cx">___________________________________________________________________
</span></span></pre></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<a id="trunkdatathemedir1defaultfunctionsphp"></a>
<div class="propset"><h4>Property changes: trunk/data/themedir1/default/functions.php</h4>
<pre class="diff"><span>
</span></pre></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<a id="trunkdatathemedir1defaultindexphp"></a>
<div class="propset"><h4>Property changes: trunk/data/themedir1/default/index.php</h4>
<pre class="diff"><span>
</span></pre></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<a id="trunkdatathemedir1pagetemplatesindexphp"></a>
<div class="propset"><h4>Property changes: trunk/data/themedir1/page-templates/index.php</h4>
<pre class="diff"><span>
</span></pre></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<a id="trunkdatathemedir1pagetemplatessubdirtemplatesubdirphp"></a>
<div class="propset"><h4>Property changes: trunk/data/themedir1/page-templates/subdir/template-sub-dir.php</h4>
<pre class="diff"><span>
</span></pre></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<a id="trunkdatathemedir1pagetemplatestemplateheaderphp"></a>
<div class="propset"><h4>Property changes: trunk/data/themedir1/page-templates/template-header.php</h4>
<pre class="diff"><span>
</span></pre></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<a id="trunkdatathemedir1pagetemplatestemplatetoplevelphp"></a>
<div class="propset"><h4>Property changes: trunk/data/themedir1/page-templates/template-top-level.php</h4>
<pre class="diff"><span>
</span></pre></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<a id="trunkdatathemedir1sandboxfunctionsphp"></a>
<div class="propset"><h4>Property changes: trunk/data/themedir1/sandbox/functions.php</h4>
<pre class="diff"><span>
</span></pre></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<a id="trunkdatathemedir1sandboxindexphp"></a>
<div class="propset"><h4>Property changes: trunk/data/themedir1/sandbox/index.php</h4>
<pre class="diff"><span>
</span></pre></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<a id="trunkdatathemedir1subdirtheme2functionsphp"></a>
<div class="propset"><h4>Property changes: trunk/data/themedir1/subdir/theme2/functions.php</h4>
<pre class="diff"><span>
</span></pre></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<a id="trunkdatathemedir1subdirtheme2indexphp"></a>
<div class="propset"><h4>Property changes: trunk/data/themedir1/subdir/theme2/index.php</h4>
<pre class="diff"><span>
</span></pre></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<a id="trunkdatathemedir1theme1functionsphp"></a>
<div class="propset"><h4>Property changes: trunk/data/themedir1/theme1/functions.php</h4>
<pre class="diff"><span>
</span></pre></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<a id="trunkdatathemedir1theme1indexphp"></a>
<div class="propset"><h4>Property changes: trunk/data/themedir1/theme1/index.php</h4>
<pre class="diff"><span>
</span></pre></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<a id="trunkdatathemedir1theme1dupefunctionsphp"></a>
<div class="propset"><h4>Property changes: trunk/data/themedir1/theme1-dupe/functions.php</h4>
<pre class="diff"><span>
</span></pre></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<a id="trunkdatathemedir1theme1dupeindexphp"></a>
<div class="propset"><h4>Property changes: trunk/data/themedir1/theme1-dupe/index.php</h4>
<pre class="diff"><span>
</span></pre></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<a id="trunkincludesexceptionsphp"></a>
<div class="modfile"><h4>Modified: trunk/includes/exceptions.php (882 => 883)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/includes/exceptions.php        2012-07-08 11:10:15 UTC (rev 882)
+++ trunk/includes/exceptions.php        2012-07-08 11:20:24 UTC (rev 883)
</span><span class="lines">@@ -1,28 +1,28 @@
</span><del>-&lt;?php
-
-class WP_Tests_Exception extends PHPUnit_Framework_Exception {
-        
-}
-
-/**
- * Exception for cases of wp_die()
- * This means there was an error (no output, and a call to wp_die)
- *
- * @package    WordPress
- * @subpackage Unit Tests
- * @since      3.4.0
- */
-class WPAjaxDieStopException extends Exception {}
-
-/**
- * Exception for cases of wp_die()
- * This means execution of the ajax function should be halted, but the unit
- * test can continue.  The function finished normally and there was not an
- * error (output happened, but wp_die was called to end execution)  This is
- * used with WP_Ajax_Response::send
- *
- * @package    WordPress
- * @subpackage Unit Tests
- * @since      3.4.0
- */
-class WPAjaxDieContinueException extends Exception {}
</del><ins>+&lt;?php
+
+class WP_Tests_Exception extends PHPUnit_Framework_Exception {
+        
+}
+
+/**
+ * Exception for cases of wp_die()
+ * This means there was an error (no output, and a call to wp_die)
+ *
+ * @package    WordPress
+ * @subpackage Unit Tests
+ * @since      3.4.0
+ */
+class WPAjaxDieStopException extends Exception {}
+
+/**
+ * Exception for cases of wp_die()
+ * This means execution of the ajax function should be halted, but the unit
+ * test can continue.  The function finished normally and there was not an
+ * error (output happened, but wp_die was called to end execution)  This is
+ * used with WP_Ajax_Response::send
+ *
+ * @package    WordPress
+ * @subpackage Unit Tests
+ * @since      3.4.0
+ */
+class WPAjaxDieContinueException extends Exception {}
</ins><span class="cx">Property changes on: trunk/includes/exceptions.php
</span><span class="cx">___________________________________________________________________
</span></span></pre></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<a id="trunkincludesfactoryphp"></a>
<div class="modfile"><h4>Modified: trunk/includes/factory.php (882 => 883)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/includes/factory.php        2012-07-08 11:10:15 UTC (rev 882)
+++ trunk/includes/factory.php        2012-07-08 11:20:24 UTC (rev 883)
</span><span class="lines">@@ -1,246 +1,246 @@
</span><del>-&lt;?php
-
-class WP_UnitTest_Factory {
-        function __construct() {
-                $this-&gt;post = new WP_UnitTest_Factory_For_Post( $this );
-                $this-&gt;comment = new WP_UnitTest_Factory_For_Comment( $this );
-                $this-&gt;user = new WP_UnitTest_Factory_For_User( $this );
-                $this-&gt;term = new WP_UnitTest_Factory_For_Term( $this );
-                if ( is_multisite() )
-                        $this-&gt;blog = new WP_UnitTest_Factory_For_Blog( $this );
-        }
-}
-
-class WP_UnitTest_Factory_For_Post extends WP_UnitTest_Factory_For_Thing {
-
-        function __construct( $factory = null ) {
-                parent::__construct( $factory );
-                $this-&gt;default_generation_definitions = array(
-                        'post_status' =&gt; 'publish',
-                        'post_title' =&gt; new WP_UnitTest_Generator_Sequence( 'Post title %s' ),
-                        'post_content' =&gt; new WP_UnitTest_Generator_Sequence( 'Post content %s' ),
-                        'post_excerpt' =&gt; new WP_UnitTest_Generator_Sequence( 'Post excerpt %s' ),
-                        'post_type' =&gt; 'post'
-                );
-        }
-
-        function create_object( $args ) {
-                return wp_insert_post( $args );
-        }
-
-        function update_object( $post_id, $fields ) {
-                $fields['ID'] = $post_id;
-                return wp_update_post( $fields );
-        }
-}
-
-class WP_UnitTest_Factory_For_User extends WP_UnitTest_Factory_For_Thing {
-
-        function __construct( $factory = null ) {
-                parent::__construct( $factory );
-                $this-&gt;default_generation_definitions = array(
-                        'user_login' =&gt; new WP_UnitTest_Generator_Sequence( 'User %s' ),
-                        'user_pass' =&gt; 'password',
-                        'user_email' =&gt; new WP_UnitTest_Generator_Sequence( 'user_%s@example.org' ),
-                );
-        }
-
-        function create_object( $args ) {
-                return wp_insert_user( $args );
-        }
-
-        function update_object( $user_id, $fields ) {
-                $fields['ID'] = $user_id;
-                return wp_update_user( $fields );
-        }
-}
-
-class WP_UnitTest_Factory_For_Comment extends WP_UnitTest_Factory_For_Thing {
-
-        function __construct( $factory = null ) {
-                parent::__construct( $factory );
-                $this-&gt;default_generation_definitions = array(
-                        'comment_author' =&gt; new WP_UnitTest_Generator_Sequence( 'Commenter %s' ),
-                        'comment_author_url' =&gt; new WP_UnitTest_Generator_Sequence( 'http://example.com/%s/' ),
-                        'comment_approved' =&gt; 1,
-                );
-        }
-
-        function create_object( $args ) {
-                return wp_insert_comment( $args );
-        }
-
-        function update_object( $comment_id, $fields ) {
-                $fields['comment_ID'] = $comment_id;
-                return wp_update_comment( $fields );
-        }
-
-        function create_post_comments( $post_id, $count = 1, $args = array(), $generation_definitions = null ) {
-                $args['comment_post_ID'] = $post_id;
-                return $this-&gt;create_many( $count, $args, $generation_definitions );
-        }
-}
-
-class WP_UnitTest_Factory_For_Blog extends WP_UnitTest_Factory_For_Thing {
-
-        function __construct( $factory = null ) {
-                global $current_site;
-                parent::__construct( $factory );
-                $this-&gt;default_generation_definitions = array(
-                        'domain' =&gt; $current_site-&gt;domain,
-                        'path' =&gt; new WP_UnitTest_Generator_Sequence( 'testpath%s' ),
-                        'title' =&gt; new WP_UnitTest_Generator_Sequence( 'Site %s' ),
-                        'site_id' =&gt; $current_site-&gt;id,
-                );
-        }
-
-        function create_object( $args ) {
-                $meta = isset( $args['meta'] ) ? $args['meta'] : array();
-                $user_id = isset( $args['user_id'] ) ? $args['user_id'] : get_current_user_id();
-                return wpmu_create_blog( $args['domain'], $args['path'], $args['title'], $user_id, $meta, $args['site_id'] );
-        }
-
-        function update_object( $blog_id, $fields ) {}
-}
-
-
-class WP_UnitTest_Factory_For_Term extends WP_UnitTest_Factory_For_Thing {
-
-        function __construct( $factory = null ) {
-                parent::__construct( $factory );
-                $this-&gt;default_generation_definitions = array(
-                        'name' =&gt; new WP_UnitTest_Generator_Sequence( 'Term %s' ),
-                        'taxonomy' =&gt; 'post_tag',
-                        'description' =&gt; new WP_UnitTest_Generator_Sequence( 'Term description %s' ),
-                );
-        }
-
-        function create_object( $args ) {
-                $term_id_pair = wp_insert_term( $args['name'], $args['taxonomy'], $args );
-                return $term_id_pair['term_id'];
-        }
-
-        function update_object( $term, $fields ) {
-                if ( is_object( $term ) )
-                        $taxonomy = $term-&gt;taxonomy;
-                elseif ( isset( $fields['taxonomy'] ) )
-                        $taxonomy = $fields['taxonomy'];
-                else
-                        $taxonomy = 'post_tag';
-                $term_id_pair = wp_update_term( $term, $taxonomy, $fields );
-                return $term_id_pair['term_id'];
-        }
-
-        function add_post_terms( $post_id, $terms, $taxonomy, $append = true ) {
-                return wp_set_post_terms( $post_id, $terms, $taxonomy, $append );
-        }
-}
-
-abstract class WP_UnitTest_Factory_For_Thing {
-
-        var $default_generation_definitions;
-        var $factory;
-
-        /**
-         * Creates a new factory, which will create objects of a specific Thing
-         *
-         * @param object $factory Global factory that can be used to create other objects on the system
-         * @param array $default_generation_definitions Defines what default values should the properties of the object have. The default values
-         * can be generators -- an object with next() method. There are some default generators: {@link WP_UnitTest_Generator_Sequence},
-         * {@link WP_UnitTest_Generator_Locale_Name}, {@link WP_UnitTest_Factory_Callback_After_Create}.
-         */
-        function __construct( $factory, $default_generation_definitions = array() ) {
-                $this-&gt;factory = $factory;
-                $this-&gt;default_generation_definitions = $default_generation_definitions;
-        }
-
-        abstract function create_object( $args );
-        abstract function update_object( $object, $fields );
-
-        function create( $args = array(), $generation_definitions = null ) {
-                if ( is_null( $generation_definitions ) )
-                        $generation_definitions = $this-&gt;default_generation_definitions;
-
-                $generated_args = $this-&gt;generate_args( $args, $generation_definitions, $callbacks );
-                $created = $this-&gt;create_object( $generated_args );
-                if ( !$created || is_wp_error( $created ) )
-                        return $created;
-
-                if ( $callbacks ) {
-                        $updated_fields = $this-&gt;apply_callbacks( $callbacks, $created );
-                        $save_result = $this-&gt;update_object( $created, $updated_fields );
-                        if ( !$save_result || is_wp_error( $save_result ) )
-                                return $save_result;
-                }
-                return $created;
-        }
-
-        function create_many( $count, $args = array(), $generation_definitions = null ) {
-                $results = array();
-                for ( $i = 0; $i &lt; $count; $i++ ) {
-                        $results[] = $this-&gt;create( $args, $generation_definitions );
-                }
-                return $results;
-        }
-
-        function generate_args( $args = array(), $generation_definitions = null, &amp;$callbacks = null ) {
-                $callbacks = array();
-                if ( is_null( $generation_definitions ) )
-                        $generation_definitions = $this-&gt;default_generation_definitions;
-
-                foreach( array_keys( $generation_definitions ) as $field_name ) {
-                        if ( !isset( $args[$field_name] ) ) {
-                                $generator = $generation_definitions[$field_name];
-                                if ( is_scalar( $generator ) )
-                                        $args[$field_name] = $generator;
-                                elseif ( is_object( $generator ) &amp;&amp; method_exists( $generator, 'call' ) ) {
-                                        $callbacks[$field_name] = $generator;
-                                } elseif ( is_object( $generator ) )
-                                        $args[$field_name] = $generator-&gt;next();
-                                else
-                                        return new WP_Error( 'invalid_argument', 'Factory default value should be either a scalar or an generator object.' );
-                        }
-                }
-                return $args;
-        }
-
-        function apply_callbacks( $callbacks, $created ) {
-                $updated_fields = array();
-                foreach( $callbacks as $field_name =&gt; $generator ) {
-                        $updated_fields[$field_name] = $generator-&gt;call( $created );
-                }
-                return $updated_fields;
-        }
-
-        function callback( $function ) {
-                return new WP_UnitTest_Factory_Callback_After_Create( $function );
-        }
-}
-
-class WP_UnitTest_Generator_Sequence {
-        var $next;
-        var $template_string;
-
-        function __construct( $template_string = '%s', $start = 1 ) {
-                $this-&gt;next = $start;
-                $this-&gt;template_string = $template_string;
-        }
-
-        function next() {
-                $generated = sprintf( $this-&gt;template_string , $this-&gt;next );
-                $this-&gt;next++;
-                return $generated;
-        }
-}
-
-class WP_UnitTest_Factory_Callback_After_Create {
-        var $callback;
-
-        function __construct( $callback ) {
-                $this-&gt;callback = $callback;
-        }
-
-        function call( $object ) {
-                return call_user_func( $this-&gt;callback, $object );
-        }
-}
</del><ins>+&lt;?php
+
+class WP_UnitTest_Factory {
+        function __construct() {
+                $this-&gt;post = new WP_UnitTest_Factory_For_Post( $this );
+                $this-&gt;comment = new WP_UnitTest_Factory_For_Comment( $this );
+                $this-&gt;user = new WP_UnitTest_Factory_For_User( $this );
+                $this-&gt;term = new WP_UnitTest_Factory_For_Term( $this );
+                if ( is_multisite() )
+                        $this-&gt;blog = new WP_UnitTest_Factory_For_Blog( $this );
+        }
+}
+
+class WP_UnitTest_Factory_For_Post extends WP_UnitTest_Factory_For_Thing {
+
+        function __construct( $factory = null ) {
+                parent::__construct( $factory );
+                $this-&gt;default_generation_definitions = array(
+                        'post_status' =&gt; 'publish',
+                        'post_title' =&gt; new WP_UnitTest_Generator_Sequence( 'Post title %s' ),
+                        'post_content' =&gt; new WP_UnitTest_Generator_Sequence( 'Post content %s' ),
+                        'post_excerpt' =&gt; new WP_UnitTest_Generator_Sequence( 'Post excerpt %s' ),
+                        'post_type' =&gt; 'post'
+                );
+        }
+
+        function create_object( $args ) {
+                return wp_insert_post( $args );
+        }
+
+        function update_object( $post_id, $fields ) {
+                $fields['ID'] = $post_id;
+                return wp_update_post( $fields );
+        }
+}
+
+class WP_UnitTest_Factory_For_User extends WP_UnitTest_Factory_For_Thing {
+
+        function __construct( $factory = null ) {
+                parent::__construct( $factory );
+                $this-&gt;default_generation_definitions = array(
+                        'user_login' =&gt; new WP_UnitTest_Generator_Sequence( 'User %s' ),
+                        'user_pass' =&gt; 'password',
+                        'user_email' =&gt; new WP_UnitTest_Generator_Sequence( 'user_%s@example.org' ),
+                );
+        }
+
+        function create_object( $args ) {
+                return wp_insert_user( $args );
+        }
+
+        function update_object( $user_id, $fields ) {
+                $fields['ID'] = $user_id;
+                return wp_update_user( $fields );
+        }
+}
+
+class WP_UnitTest_Factory_For_Comment extends WP_UnitTest_Factory_For_Thing {
+
+        function __construct( $factory = null ) {
+                parent::__construct( $factory );
+                $this-&gt;default_generation_definitions = array(
+                        'comment_author' =&gt; new WP_UnitTest_Generator_Sequence( 'Commenter %s' ),
+                        'comment_author_url' =&gt; new WP_UnitTest_Generator_Sequence( 'http://example.com/%s/' ),
+                        'comment_approved' =&gt; 1,
+                );
+        }
+
+        function create_object( $args ) {
+                return wp_insert_comment( $args );
+        }
+
+        function update_object( $comment_id, $fields ) {
+                $fields['comment_ID'] = $comment_id;
+                return wp_update_comment( $fields );
+        }
+
+        function create_post_comments( $post_id, $count = 1, $args = array(), $generation_definitions = null ) {
+                $args['comment_post_ID'] = $post_id;
+                return $this-&gt;create_many( $count, $args, $generation_definitions );
+        }
+}
+
+class WP_UnitTest_Factory_For_Blog extends WP_UnitTest_Factory_For_Thing {
+
+        function __construct( $factory = null ) {
+                global $current_site;
+                parent::__construct( $factory );
+                $this-&gt;default_generation_definitions = array(
+                        'domain' =&gt; $current_site-&gt;domain,
+                        'path' =&gt; new WP_UnitTest_Generator_Sequence( 'testpath%s' ),
+                        'title' =&gt; new WP_UnitTest_Generator_Sequence( 'Site %s' ),
+                        'site_id' =&gt; $current_site-&gt;id,
+                );
+        }
+
+        function create_object( $args ) {
+                $meta = isset( $args['meta'] ) ? $args['meta'] : array();
+                $user_id = isset( $args['user_id'] ) ? $args['user_id'] : get_current_user_id();
+                return wpmu_create_blog( $args['domain'], $args['path'], $args['title'], $user_id, $meta, $args['site_id'] );
+        }
+
+        function update_object( $blog_id, $fields ) {}
+}
+
+
+class WP_UnitTest_Factory_For_Term extends WP_UnitTest_Factory_For_Thing {
+
+        function __construct( $factory = null ) {
+                parent::__construct( $factory );
+                $this-&gt;default_generation_definitions = array(
+                        'name' =&gt; new WP_UnitTest_Generator_Sequence( 'Term %s' ),
+                        'taxonomy' =&gt; 'post_tag',
+                        'description' =&gt; new WP_UnitTest_Generator_Sequence( 'Term description %s' ),
+                );
+        }
+
+        function create_object( $args ) {
+                $term_id_pair = wp_insert_term( $args['name'], $args['taxonomy'], $args );
+                return $term_id_pair['term_id'];
+        }
+
+        function update_object( $term, $fields ) {
+                if ( is_object( $term ) )
+                        $taxonomy = $term-&gt;taxonomy;
+                elseif ( isset( $fields['taxonomy'] ) )
+                        $taxonomy = $fields['taxonomy'];
+                else
+                        $taxonomy = 'post_tag';
+                $term_id_pair = wp_update_term( $term, $taxonomy, $fields );
+                return $term_id_pair['term_id'];
+        }
+
+        function add_post_terms( $post_id, $terms, $taxonomy, $append = true ) {
+                return wp_set_post_terms( $post_id, $terms, $taxonomy, $append );
+        }
+}
+
+abstract class WP_UnitTest_Factory_For_Thing {
+
+        var $default_generation_definitions;
+        var $factory;
+
+        /**
+         * Creates a new factory, which will create objects of a specific Thing
+         *
+         * @param object $factory Global factory that can be used to create other objects on the system
+         * @param array $default_generation_definitions Defines what default values should the properties of the object have. The default values
+         * can be generators -- an object with next() method. There are some default generators: {@link WP_UnitTest_Generator_Sequence},
+         * {@link WP_UnitTest_Generator_Locale_Name}, {@link WP_UnitTest_Factory_Callback_After_Create}.
+         */
+        function __construct( $factory, $default_generation_definitions = array() ) {
+                $this-&gt;factory = $factory;
+                $this-&gt;default_generation_definitions = $default_generation_definitions;
+        }
+
+        abstract function create_object( $args );
+        abstract function update_object( $object, $fields );
+
+        function create( $args = array(), $generation_definitions = null ) {
+                if ( is_null( $generation_definitions ) )
+                        $generation_definitions = $this-&gt;default_generation_definitions;
+
+                $generated_args = $this-&gt;generate_args( $args, $generation_definitions, $callbacks );
+                $created = $this-&gt;create_object( $generated_args );
+                if ( !$created || is_wp_error( $created ) )
+                        return $created;
+
+                if ( $callbacks ) {
+                        $updated_fields = $this-&gt;apply_callbacks( $callbacks, $created );
+                        $save_result = $this-&gt;update_object( $created, $updated_fields );
+                        if ( !$save_result || is_wp_error( $save_result ) )
+                                return $save_result;
+                }
+                return $created;
+        }
+
+        function create_many( $count, $args = array(), $generation_definitions = null ) {
+                $results = array();
+                for ( $i = 0; $i &lt; $count; $i++ ) {
+                        $results[] = $this-&gt;create( $args, $generation_definitions );
+                }
+                return $results;
+        }
+
+        function generate_args( $args = array(), $generation_definitions = null, &amp;$callbacks = null ) {
+                $callbacks = array();
+                if ( is_null( $generation_definitions ) )
+                        $generation_definitions = $this-&gt;default_generation_definitions;
+
+                foreach( array_keys( $generation_definitions ) as $field_name ) {
+                        if ( !isset( $args[$field_name] ) ) {
+                                $generator = $generation_definitions[$field_name];
+                                if ( is_scalar( $generator ) )
+                                        $args[$field_name] = $generator;
+                                elseif ( is_object( $generator ) &amp;&amp; method_exists( $generator, 'call' ) ) {
+                                        $callbacks[$field_name] = $generator;
+                                } elseif ( is_object( $generator ) )
+                                        $args[$field_name] = $generator-&gt;next();
+                                else
+                                        return new WP_Error( 'invalid_argument', 'Factory default value should be either a scalar or an generator object.' );
+                        }
+                }
+                return $args;
+        }
+
+        function apply_callbacks( $callbacks, $created ) {
+                $updated_fields = array();
+                foreach( $callbacks as $field_name =&gt; $generator ) {
+                        $updated_fields[$field_name] = $generator-&gt;call( $created );
+                }
+                return $updated_fields;
+        }
+
+        function callback( $function ) {
+                return new WP_UnitTest_Factory_Callback_After_Create( $function );
+        }
+}
+
+class WP_UnitTest_Generator_Sequence {
+        var $next;
+        var $template_string;
+
+        function __construct( $template_string = '%s', $start = 1 ) {
+                $this-&gt;next = $start;
+                $this-&gt;template_string = $template_string;
+        }
+
+        function next() {
+                $generated = sprintf( $this-&gt;template_string , $this-&gt;next );
+                $this-&gt;next++;
+                return $generated;
+        }
+}
+
+class WP_UnitTest_Factory_Callback_After_Create {
+        var $callback;
+
+        function __construct( $callback ) {
+                $this-&gt;callback = $callback;
+        }
+
+        function call( $object ) {
+                return call_user_func( $this-&gt;callback, $object );
+        }
+}
</ins><span class="cx">Property changes on: trunk/includes/factory.php
</span><span class="cx">___________________________________________________________________
</span></span></pre></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<a id="trunkincludesfunctionsphp"></a>
<div class="modfile"><h4>Modified: trunk/includes/functions.php (882 => 883)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/includes/functions.php        2012-07-08 11:10:15 UTC (rev 882)
+++ trunk/includes/functions.php        2012-07-08 11:20:24 UTC (rev 883)
</span><span class="lines">@@ -1,44 +1,44 @@
</span><del>-&lt;?php
-
-// For adding hooks before loading WP
-function tests_add_filter($tag, $function_to_add, $priority = 10, $accepted_args = 1) {
-        global $wp_filter, $merged_filters;
-
-        $idx = _test_filter_build_unique_id($tag, $function_to_add, $priority);
-        $wp_filter[$tag][$priority][$idx] = array('function' =&gt; $function_to_add, 'accepted_args' =&gt; $accepted_args);
-        unset( $merged_filters[ $tag ] );
-        return true;
-}
-
-function _test_filter_build_unique_id($tag, $function, $priority) {
-        global $wp_filter;
-        static $filter_id_count = 0;
-
-        if ( is_string($function) )
-                return $function;
-
-        if ( is_object($function) ) {
-                // Closures are currently implemented as objects
-                $function = array( $function, '' );
-        } else {
-                $function = (array) $function;
-        }
-
-        if (is_object($function[0]) ) {
-                return spl_object_hash($function[0]) . $function[1];
-        } else if ( is_string($function[0]) ) {
-                // Static Calling
-                return $function[0].$function[1];
-        }
-}
-
-function _delete_all_posts() {
-        global $wpdb;
-
-        $all_posts = $wpdb-&gt;get_col(&quot;SELECT ID from {$wpdb-&gt;posts}&quot;);
-        if ($all_posts) {
-                foreach ($all_posts as $id)
-                        wp_delete_post( $id, true );
-        }
-}
-
</del><ins>+&lt;?php
+
+// For adding hooks before loading WP
+function tests_add_filter($tag, $function_to_add, $priority = 10, $accepted_args = 1) {
+        global $wp_filter, $merged_filters;
+
+        $idx = _test_filter_build_unique_id($tag, $function_to_add, $priority);
+        $wp_filter[$tag][$priority][$idx] = array('function' =&gt; $function_to_add, 'accepted_args' =&gt; $accepted_args);
+        unset( $merged_filters[ $tag ] );
+        return true;
+}
+
+function _test_filter_build_unique_id($tag, $function, $priority) {
+        global $wp_filter;
+        static $filter_id_count = 0;
+
+        if ( is_string($function) )
+                return $function;
+
+        if ( is_object($function) ) {
+                // Closures are currently implemented as objects
+                $function = array( $function, '' );
+        } else {
+                $function = (array) $function;
+        }
+
+        if (is_object($function[0]) ) {
+                return spl_object_hash($function[0]) . $function[1];
+        } else if ( is_string($function[0]) ) {
+                // Static Calling
+                return $function[0].$function[1];
+        }
+}
+
+function _delete_all_posts() {
+        global $wpdb;
+
+        $all_posts = $wpdb-&gt;get_col(&quot;SELECT ID from {$wpdb-&gt;posts}&quot;);
+        if ($all_posts) {
+                foreach ($all_posts as $id)
+                        wp_delete_post( $id, true );
+        }
+}
+
</ins><span class="cx">Property changes on: trunk/includes/functions.php
</span><span class="cx">___________________________________________________________________
</span></span></pre></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<a id="trunkincludestestcasexmlrpcphp"></a>
<div class="modfile"><h4>Modified: trunk/includes/testcase-xmlrpc.php (882 => 883)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/includes/testcase-xmlrpc.php        2012-07-08 11:10:15 UTC (rev 882)
+++ trunk/includes/testcase-xmlrpc.php        2012-07-08 11:20:24 UTC (rev 883)
</span><span class="lines">@@ -1,30 +1,30 @@
</span><del>-&lt;?php
-include_once(ABSPATH . 'wp-admin/includes/admin.php');
-include_once(ABSPATH . WPINC . '/class-IXR.php');
-include_once(ABSPATH . WPINC . '/class-wp-xmlrpc-server.php');
-
-class WP_XMLRPC_UnitTestCase extends WP_UnitTestCase {
-        protected $myxmlrpcserver;
-
-        function setUp() {
-                parent::setUp();
-
-                add_filter( 'pre_option_enable_xmlrpc', '__return_true' );
-
-                $this-&gt;myxmlrpcserver = new wp_xmlrpc_server();
-        }
-
-        function tearDown() {
-                remove_filter( 'pre_option_enable_xmlrpc', '__return_true' );
-
-                parent::tearDown();
-        }
-
-        protected function make_user_by_role( $role ) {
-                return $this-&gt;factory-&gt;user-&gt;create( array(
-                        'user_login' =&gt; $role,
-                        'user_pass'  =&gt; $role,
-                        'role'       =&gt; $role
-                ));
-        }
-}
</del><ins>+&lt;?php
+include_once(ABSPATH . 'wp-admin/includes/admin.php');
+include_once(ABSPATH . WPINC . '/class-IXR.php');
+include_once(ABSPATH . WPINC . '/class-wp-xmlrpc-server.php');
+
+class WP_XMLRPC_UnitTestCase extends WP_UnitTestCase {
+        protected $myxmlrpcserver;
+
+        function setUp() {
+                parent::setUp();
+
+                add_filter( 'pre_option_enable_xmlrpc', '__return_true' );
+
+                $this-&gt;myxmlrpcserver = new wp_xmlrpc_server();
+        }
+
+        function tearDown() {
+                remove_filter( 'pre_option_enable_xmlrpc', '__return_true' );
+
+                parent::tearDown();
+        }
+
+        protected function make_user_by_role( $role ) {
+                return $this-&gt;factory-&gt;user-&gt;create( array(
+                        'user_login' =&gt; $role,
+                        'user_pass'  =&gt; $role,
+                        'role'       =&gt; $role
+                ));
+        }
+}
</ins><span class="cx">Property changes on: trunk/includes/testcase-xmlrpc.php
</span><span class="cx">___________________________________________________________________
</span></span></pre></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<a id="trunkincludestestcasephp"></a>
<div class="modfile"><h4>Modified: trunk/includes/testcase.php (882 => 883)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/includes/testcase.php        2012-07-08 11:10:15 UTC (rev 882)
+++ trunk/includes/testcase.php        2012-07-08 11:20:24 UTC (rev 883)
</span><span class="lines">@@ -1,156 +1,156 @@
</span><del>-&lt;?php
-
-require_once 'factory.php';
-require_once 'trac.php';
-
-class WP_UnitTestCase extends PHPUnit_Framework_TestCase {
-
-        function setUp() {
-                global $wpdb;
-                $wpdb-&gt;suppress_errors = false;
-                $wpdb-&gt;show_errors = true;
-                $wpdb-&gt;db_connect();
-                ini_set('display_errors', 1 );
-                $this-&gt;factory = new WP_UnitTest_Factory;
-                $this-&gt;clean_up_global_scope();
-                $this-&gt;start_transaction();
-        }
-
-        function tearDown() {
-                global $wpdb;
-                $wpdb-&gt;query( 'ROLLBACK' );
-                remove_filter( 'dbdelta_create_queries', array( $this, '_create_temporary_tables' ) );
-                remove_filter( 'query', array( $this, '_drop_temporary_tables' ) );
-        }
-
-        function clean_up_global_scope() {
-                $_GET = array();
-                $_POST = array();
-                $this-&gt;flush_cache();
-        }
-
-        function flush_cache() {
-                global $wp_object_cache;
-                $wp_object_cache-&gt;group_ops = array();
-                $wp_object_cache-&gt;stats = array();
-                $wp_object_cache-&gt;memcache_debug = array();
-                $wp_object_cache-&gt;cache = array();
-                if ( method_exists( $wp_object_cache, '__remoteset' ) ) {
-                        $wp_object_cache-&gt;__remoteset();
-                }
-                wp_cache_flush();
-        }
-
-        function start_transaction() {
-                global $wpdb;
-                $wpdb-&gt;query( 'SET autocommit = 0;' );
-                $wpdb-&gt;query( 'START TRANSACTION;' );
-                add_filter( 'dbdelta_create_queries', array( $this, '_create_temporary_tables' ) );
-                add_filter( 'query', array( $this, '_drop_temporary_tables' ) );
-        }
-
-        function _create_temporary_tables( $queries ) {
-                return str_replace( 'CREATE TABLE', 'CREATE TEMPORARY TABLE', $queries );
-        }
-
-        function _drop_temporary_tables( $query ) {
-                if ( 'DROP TABLE' === substr( $query, 0, 10 ) )
-                        return 'DROP TEMPORARY TABLE ' . substr( $query, 10 );
-                return $query;
-        }
-
-        function assertWPError( $actual, $message = '' ) {
-                $this-&gt;assertInstanceOf( 'WP_Error', $actual, $message );
-        }
-
-        function assertEqualFields( $object, $fields ) {
-                foreach( $fields as $field_name =&gt; $field_value ) {
-                        if ( $object-&gt;$field_name != $field_value ) {
-                                $this-&gt;fail();
-                        }
-                }
-        }
-
-        function assertDiscardWhitespace( $expected, $actual ) {
-                $this-&gt;assertEquals( preg_replace( '/\s*/', '', $expected ), preg_replace( '/\s*/', '', $actual ) );
-        }
-
-        function go_to( $url ) {
-                // note: the WP and WP_Query classes like to silently fetch parameters
-                // from all over the place (globals, GET, etc), which makes it tricky
-                // to run them more than once without very carefully clearing everything
-                $_GET = $_POST = array();
-                foreach (array('query_string', 'id', 'postdata', 'authordata', 'day', 'currentmonth', 'page', 'pages', 'multipage', 'more', 'numpages', 'pagenow') as $v) {
-                        if ( isset( $GLOBALS[$v] ) ) unset( $GLOBALS[$v] );
-                }
-                $parts = parse_url($url);
-                if (isset($parts['scheme'])) {
-                        $req = $parts['path'];
-                        if (isset($parts['query'])) {
-                                $req .= '?' . $parts['query'];
-                                // parse the url query vars into $_GET
-                                parse_str($parts['query'], $_GET);
-                        }
-                } else {
-                        $req = $url;
-                }
-                if ( ! isset( $parts['query'] ) ) {
-                        $parts['query'] = '';
-                }
-
-                $_SERVER['REQUEST_URI'] = $req;
-                unset($_SERVER['PATH_INFO']);
-
-                $this-&gt;flush_cache();
-                unset($GLOBALS['wp_query'], $GLOBALS['wp_the_query']);
-                $GLOBALS['wp_the_query'] =&amp; new WP_Query();
-                $GLOBALS['wp_query'] =&amp; $GLOBALS['wp_the_query'];
-                $GLOBALS['wp'] =&amp; new WP();
-
-                // clean out globals to stop them polluting wp and wp_query
-                foreach ($GLOBALS['wp']-&gt;public_query_vars as $v) {
-                        unset($GLOBALS[$v]);
-                }
-                foreach ($GLOBALS['wp']-&gt;private_query_vars as $v) {
-                        unset($GLOBALS[$v]);
-                }
-
-                $GLOBALS['wp']-&gt;main($parts['query']);
-        }
-
-        /**
-         * Skips the current test if there is open WordPress ticket with id $ticket_id
-         */
-        function knownWPBug( $ticket_id ) {
-                if ( ! WP_TESTS_FORCE_KNOWN_BUGS &amp;&amp; ! TracTickets::isTracTicketClosed( 'http://core.trac.wordpress.org', $ticket_id ) ) {
-                        $this-&gt;markTestSkipped( sprintf( 'WordPress Ticket #%d is not fixed', $ticket_id ) );
-                }
-        }
-
-        /**
-         * Skips the current test if there is open unit tests ticket with id $ticket_id
-         */
-        function knownUTBug( $ticket_id ) {
-                if ( ! WP_TESTS_FORCE_KNOWN_BUGS &amp;&amp; ! TracTickets::isTracTicketClosed( 'http://unit-tests.trac.wordpress.org', $ticket_id ) ) {
-                        $this-&gt;markTestSkipped( sprintf( 'Unit Tests Ticket #%d is not fixed', $ticket_id ) );
-                }
-        }
-
-        /**
-         * Skips the current test if there is open plugin ticket with id $ticket_id
-         */
-        function knownPluginBug( $ticket_id ) {
-                if ( ! WP_TESTS_FORCE_KNOWN_BUGS &amp;&amp; ! TracTickets::isTracTicketClosed( 'http://plugins.trac.wordpress.org', $ticket_id ) ) {
-                        $this-&gt;markTestSkipped( sprintf( 'WordPress Plugin Ticket #%d is not fixed', $ticket_id ) );
-                }
-        }
-
-        /**
-         * Define constants after including files.
-         */
-        function prepareTemplate( $template ) {
-                $template-&gt;setVar( array( 'constants' =&gt; '' ) );
-                $template-&gt;setVar( array( 'wp_constants' =&gt; PHPUnit_Util_GlobalState::getConstantsAsString() ) );
-                parent::prepareTemplate( $template );
-        }
-}
</del><ins>+&lt;?php
+
+require_once 'factory.php';
+require_once 'trac.php';
+
+class WP_UnitTestCase extends PHPUnit_Framework_TestCase {
+
+        function setUp() {
+                global $wpdb;
+                $wpdb-&gt;suppress_errors = false;
+                $wpdb-&gt;show_errors = true;
+                $wpdb-&gt;db_connect();
+                ini_set('display_errors', 1 );
+                $this-&gt;factory = new WP_UnitTest_Factory;
+                $this-&gt;clean_up_global_scope();
+                $this-&gt;start_transaction();
+        }
+
+        function tearDown() {
+                global $wpdb;
+                $wpdb-&gt;query( 'ROLLBACK' );
+                remove_filter( 'dbdelta_create_queries', array( $this, '_create_temporary_tables' ) );
+                remove_filter( 'query', array( $this, '_drop_temporary_tables' ) );
+        }
+
+        function clean_up_global_scope() {
+                $_GET = array();
+                $_POST = array();
+                $this-&gt;flush_cache();
+        }
+
+        function flush_cache() {
+                global $wp_object_cache;
+                $wp_object_cache-&gt;group_ops = array();
+                $wp_object_cache-&gt;stats = array();
+                $wp_object_cache-&gt;memcache_debug = array();
+                $wp_object_cache-&gt;cache = array();
+                if ( method_exists( $wp_object_cache, '__remoteset' ) ) {
+                        $wp_object_cache-&gt;__remoteset();
+                }
+                wp_cache_flush();
+        }
+
+        function start_transaction() {
+                global $wpdb;
+                $wpdb-&gt;query( 'SET autocommit = 0;' );
+                $wpdb-&gt;query( 'START TRANSACTION;' );
+                add_filter( 'dbdelta_create_queries', array( $this, '_create_temporary_tables' ) );
+                add_filter( 'query', array( $this, '_drop_temporary_tables' ) );
+        }
+
+        function _create_temporary_tables( $queries ) {
+                return str_replace( 'CREATE TABLE', 'CREATE TEMPORARY TABLE', $queries );
+        }
+
+        function _drop_temporary_tables( $query ) {
+                if ( 'DROP TABLE' === substr( $query, 0, 10 ) )
+                        return 'DROP TEMPORARY TABLE ' . substr( $query, 10 );
+                return $query;
+        }
+
+        function assertWPError( $actual, $message = '' ) {
+                $this-&gt;assertInstanceOf( 'WP_Error', $actual, $message );
+        }
+
+        function assertEqualFields( $object, $fields ) {
+                foreach( $fields as $field_name =&gt; $field_value ) {
+                        if ( $object-&gt;$field_name != $field_value ) {
+                                $this-&gt;fail();
+                        }
+                }
+        }
+
+        function assertDiscardWhitespace( $expected, $actual ) {
+                $this-&gt;assertEquals( preg_replace( '/\s*/', '', $expected ), preg_replace( '/\s*/', '', $actual ) );
+        }
+
+        function go_to( $url ) {
+                // note: the WP and WP_Query classes like to silently fetch parameters
+                // from all over the place (globals, GET, etc), which makes it tricky
+                // to run them more than once without very carefully clearing everything
+                $_GET = $_POST = array();
+                foreach (array('query_string', 'id', 'postdata', 'authordata', 'day', 'currentmonth', 'page', 'pages', 'multipage', 'more', 'numpages', 'pagenow') as $v) {
+                        if ( isset( $GLOBALS[$v] ) ) unset( $GLOBALS[$v] );
+                }
+                $parts = parse_url($url);
+                if (isset($parts['scheme'])) {
+                        $req = $parts['path'];
+                        if (isset($parts['query'])) {
+                                $req .= '?' . $parts['query'];
+                                // parse the url query vars into $_GET
+                                parse_str($parts['query'], $_GET);
+                        }
+                } else {
+                        $req = $url;
+                }
+                if ( ! isset( $parts['query'] ) ) {
+                        $parts['query'] = '';
+                }
+
+                $_SERVER['REQUEST_URI'] = $req;
+                unset($_SERVER['PATH_INFO']);
+
+                $this-&gt;flush_cache();
+                unset($GLOBALS['wp_query'], $GLOBALS['wp_the_query']);
+                $GLOBALS['wp_the_query'] =&amp; new WP_Query();
+                $GLOBALS['wp_query'] =&amp; $GLOBALS['wp_the_query'];
+                $GLOBALS['wp'] =&amp; new WP();
+
+                // clean out globals to stop them polluting wp and wp_query
+                foreach ($GLOBALS['wp']-&gt;public_query_vars as $v) {
+                        unset($GLOBALS[$v]);
+                }
+                foreach ($GLOBALS['wp']-&gt;private_query_vars as $v) {
+                        unset($GLOBALS[$v]);
+                }
+
+                $GLOBALS['wp']-&gt;main($parts['query']);
+        }
+
+        /**
+         * Skips the current test if there is open WordPress ticket with id $ticket_id
+         */
+        function knownWPBug( $ticket_id ) {
+                if ( ! WP_TESTS_FORCE_KNOWN_BUGS &amp;&amp; ! TracTickets::isTracTicketClosed( 'http://core.trac.wordpress.org', $ticket_id ) ) {
+                        $this-&gt;markTestSkipped( sprintf( 'WordPress Ticket #%d is not fixed', $ticket_id ) );
+                }
+        }
+
+        /**
+         * Skips the current test if there is open unit tests ticket with id $ticket_id
+         */
+        function knownUTBug( $ticket_id ) {
+                if ( ! WP_TESTS_FORCE_KNOWN_BUGS &amp;&amp; ! TracTickets::isTracTicketClosed( 'http://unit-tests.trac.wordpress.org', $ticket_id ) ) {
+                        $this-&gt;markTestSkipped( sprintf( 'Unit Tests Ticket #%d is not fixed', $ticket_id ) );
+                }
+        }
+
+        /**
+         * Skips the current test if there is open plugin ticket with id $ticket_id
+         */
+        function knownPluginBug( $ticket_id ) {
+                if ( ! WP_TESTS_FORCE_KNOWN_BUGS &amp;&amp; ! TracTickets::isTracTicketClosed( 'http://plugins.trac.wordpress.org', $ticket_id ) ) {
+                        $this-&gt;markTestSkipped( sprintf( 'WordPress Plugin Ticket #%d is not fixed', $ticket_id ) );
+                }
+        }
+
+        /**
+         * Define constants after including files.
+         */
+        function prepareTemplate( $template ) {
+                $template-&gt;setVar( array( 'constants' =&gt; '' ) );
+                $template-&gt;setVar( array( 'wp_constants' =&gt; PHPUnit_Util_GlobalState::getConstantsAsString() ) );
+                parent::prepareTemplate( $template );
+        }
+}
</ins><span class="cx">Property changes on: trunk/includes/testcase.php
</span><span class="cx">___________________________________________________________________
</span></span></pre></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<a id="trunkincludestracphp"></a>
<div class="modfile"><h4>Modified: trunk/includes/trac.php (882 => 883)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/includes/trac.php        2012-07-08 11:10:15 UTC (rev 882)
+++ trunk/includes/trac.php        2012-07-08 11:20:24 UTC (rev 883)
</span><span class="lines">@@ -1,42 +1,42 @@
</span><del>-&lt;?php
-
-class TracTickets {
-        /**
-         * Whenever a track ticket is checked to see if it's closed or not
-         * the results are stored here
-         * @var array
-         */
-        protected static $trac_ticket_cache = array();
-
-        /**
-         * Checks if track ticket #$ticket_id is resolved
-         *
-         * @return bool|null true if the ticket is resolved, false if not resolved, null on error
-         */
-        static function isTracTicketClosed($trac_url, $ticket_id) {
-                $trac_url = rtrim($trac_url, '/');
-                $url = &quot;$trac_url/ticket/$ticket_id?format=tab&quot;;
-                if ( array_key_exists( $url, self::$trac_ticket_cache ) ) {
-                        return self::$trac_ticket_cache[$url];
-                }
-                $ticket_tsv = file_get_contents($url);
-                if (false === $ticket_tsv) {
-                        self::$trac_ticket_cache[$url] = null;
-                        return self::$trac_ticket_cache[$url];
-                }
-                $lines = explode(&quot;\n&quot;, $ticket_tsv, 2);
-                if (!is_array($lines) || count($lines) &lt; 2) {
-                        self::$trac_ticket_cache[$url] = null;
-                        return self::$trac_ticket_cache[$url];
-                }
-                $titles = str_getcsv( $lines[0], &quot;\t&quot; );
-                $status_idx = array_search('status', $titles);
-                if (false === $status_idx) {
-                        self::$trac_ticket_cache[$url] = null;
-                        return self::$trac_ticket_cache[$url];
-                }
-                $tabs = str_getcsv( $lines[1], &quot;\t&quot; );
-                self::$trac_ticket_cache[$url] = ( 'closed' === $tabs[$status_idx] );
-                return self::$trac_ticket_cache[$url];
-        }
</del><ins>+&lt;?php
+
+class TracTickets {
+        /**
+         * Whenever a track ticket is checked to see if it's closed or not
+         * the results are stored here
+         * @var array
+         */
+        protected static $trac_ticket_cache = array();
+
+        /**
+         * Checks if track ticket #$ticket_id is resolved
+         *
+         * @return bool|null true if the ticket is resolved, false if not resolved, null on error
+         */
+        static function isTracTicketClosed($trac_url, $ticket_id) {
+                $trac_url = rtrim($trac_url, '/');
+                $url = &quot;$trac_url/ticket/$ticket_id?format=tab&quot;;
+                if ( array_key_exists( $url, self::$trac_ticket_cache ) ) {
+                        return self::$trac_ticket_cache[$url];
+                }
+                $ticket_tsv = file_get_contents($url);
+                if (false === $ticket_tsv) {
+                        self::$trac_ticket_cache[$url] = null;
+                        return self::$trac_ticket_cache[$url];
+                }
+                $lines = explode(&quot;\n&quot;, $ticket_tsv, 2);
+                if (!is_array($lines) || count($lines) &lt; 2) {
+                        self::$trac_ticket_cache[$url] = null;
+                        return self::$trac_ticket_cache[$url];
+                }
+                $titles = str_getcsv( $lines[0], &quot;\t&quot; );
+                $status_idx = array_search('status', $titles);
+                if (false === $status_idx) {
+                        self::$trac_ticket_cache[$url] = null;
+                        return self::$trac_ticket_cache[$url];
+                }
+                $tabs = str_getcsv( $lines[1], &quot;\t&quot; );
+                self::$trac_ticket_cache[$url] = ( 'closed' === $tabs[$status_idx] );
+                return self::$trac_ticket_cache[$url];
+        }
</ins><span class="cx"> }
</span><span class="cx">\ No newline at end of file
</span><span class="cx">Property changes on: trunk/includes/trac.php
</span><span class="cx">___________________________________________________________________
</span></span></pre></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<a id="trunkteststestajaxactionstest_admin_ajax_save_draftphp"></a>
<div class="propset"><h4>Property changes: trunk/tests/test-ajax-actions/test_admin_ajax_save_draft.php</h4>
<pre class="diff"><span>
</span></pre></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<a id="trunkteststestxmlrpcapitest_mt_getRecentPostTitlesphp"></a>
<div class="modfile"><h4>Modified: trunk/tests/test-xmlrpc-api/test_mt_getRecentPostTitles.php (882 => 883)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/tests/test-xmlrpc-api/test_mt_getRecentPostTitles.php        2012-07-08 11:10:15 UTC (rev 882)
+++ trunk/tests/test-xmlrpc-api/test_mt_getRecentPostTitles.php        2012-07-08 11:20:24 UTC (rev 883)
</span><span class="lines">@@ -1,51 +1,51 @@
</span><del>-&lt;?php
-
-/**
- * @group xmlrpc
- */
-class TestXMLRPCServer_mt_getRecentPostTitles extends WP_XMLRPC_UnitTestCase {
-
-        function test_invalid_username_password() {
-                $result = $this-&gt;myxmlrpcserver-&gt;mt_getRecentPostTitles( array( 1, 'username', 'password' ) );
-                $this-&gt;assertInstanceOf( 'IXR_Error', $result );
-                $this-&gt;assertEquals( 403, $result-&gt;code );
-        }
-
-        function test_no_posts() {
-                $this-&gt;make_user_by_role( 'author' );
-
-                $result = $this-&gt;myxmlrpcserver-&gt;mt_getRecentPostTitles( array( 1, 'author', 'author' ) );
-                $this-&gt;assertInstanceOf( 'IXR_Error', $result );
-                $this-&gt;assertEquals( 500, $result-&gt;code );
-        }
-
-        function test_no_editable_posts() {
-                $this-&gt;make_user_by_role( 'author' );
-                $editor = $this-&gt;make_user_by_role( 'editor' );
-                $this-&gt;factory-&gt;post-&gt;create( array( 'post_author' =&gt; $editor ) );
-
-                $result = $this-&gt;myxmlrpcserver-&gt;mt_getRecentPostTitles( array( 1, 'author', 'author' ) );
-                $this-&gt;assertNotInstanceOf( 'IXR_Error', $result );
-                $this-&gt;assertEquals( 0, count( $result ) );
-        }
-
-        function test_date() {
-                $this-&gt;make_user_by_role( 'author' );
-
-                $this-&gt;factory-&gt;post-&gt;create();
-
-                $results = $this-&gt;myxmlrpcserver-&gt;mt_getRecentPostTitles( array( 1, 'author', 'author' ) );
-                $this-&gt;assertNotInstanceOf( 'IXR_Error', $results );
-
-                foreach( $results as $result ) {
-                        $post = get_post( $result['postid'] );
-                        $date_gmt = strtotime( get_gmt_from_date( mysql2date( 'Y-m-d H:i:s', $post-&gt;post_date, false ), 'Ymd\TH:i:s' ) );
-
-                        $this-&gt;assertInstanceOf( 'IXR_Date', $result['dateCreated'] );
-                        $this-&gt;assertInstanceOf( 'IXR_Date', $result['date_created_gmt'] );
-
-                        $this-&gt;assertEquals( strtotime( $post-&gt;post_date ), $result['dateCreated']-&gt;getTimestamp() );
-                        $this-&gt;assertEquals( $date_gmt, $result['date_created_gmt']-&gt;getTimestamp() );
-                }
-        }
-}
</del><ins>+&lt;?php
+
+/**
+ * @group xmlrpc
+ */
+class TestXMLRPCServer_mt_getRecentPostTitles extends WP_XMLRPC_UnitTestCase {
+
+        function test_invalid_username_password() {
+                $result = $this-&gt;myxmlrpcserver-&gt;mt_getRecentPostTitles( array( 1, 'username', 'password' ) );
+                $this-&gt;assertInstanceOf( 'IXR_Error', $result );
+                $this-&gt;assertEquals( 403, $result-&gt;code );
+        }
+
+        function test_no_posts() {
+                $this-&gt;make_user_by_role( 'author' );
+
+                $result = $this-&gt;myxmlrpcserver-&gt;mt_getRecentPostTitles( array( 1, 'author', 'author' ) );
+                $this-&gt;assertInstanceOf( 'IXR_Error', $result );
+                $this-&gt;assertEquals( 500, $result-&gt;code );
+        }
+
+        function test_no_editable_posts() {
+                $this-&gt;make_user_by_role( 'author' );
+                $editor = $this-&gt;make_user_by_role( 'editor' );
+                $this-&gt;factory-&gt;post-&gt;create( array( 'post_author' =&gt; $editor ) );
+
+                $result = $this-&gt;myxmlrpcserver-&gt;mt_getRecentPostTitles( array( 1, 'author', 'author' ) );
+                $this-&gt;assertNotInstanceOf( 'IXR_Error', $result );
+                $this-&gt;assertEquals( 0, count( $result ) );
+        }
+
+        function test_date() {
+                $this-&gt;make_user_by_role( 'author' );
+
+                $this-&gt;factory-&gt;post-&gt;create();
+
+                $results = $this-&gt;myxmlrpcserver-&gt;mt_getRecentPostTitles( array( 1, 'author', 'author' ) );
+                $this-&gt;assertNotInstanceOf( 'IXR_Error', $results );
+
+                foreach( $results as $result ) {
+                        $post = get_post( $result['postid'] );
+                        $date_gmt = strtotime( get_gmt_from_date( mysql2date( 'Y-m-d H:i:s', $post-&gt;post_date, false ), 'Ymd\TH:i:s' ) );
+
+                        $this-&gt;assertInstanceOf( 'IXR_Date', $result['dateCreated'] );
+                        $this-&gt;assertInstanceOf( 'IXR_Date', $result['date_created_gmt'] );
+
+                        $this-&gt;assertEquals( strtotime( $post-&gt;post_date ), $result['dateCreated']-&gt;getTimestamp() );
+                        $this-&gt;assertEquals( $date_gmt, $result['date_created_gmt']-&gt;getTimestamp() );
+                }
+        }
+}
</ins><span class="cx">Property changes on: trunk/tests/test-xmlrpc-api/test_mt_getRecentPostTitles.php
</span><span class="cx">___________________________________________________________________
</span></span></pre></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<a id="trunkteststestxmlrpcapitest_mw_getPostphp"></a>
<div class="modfile"><h4>Modified: trunk/tests/test-xmlrpc-api/test_mw_getPost.php (882 => 883)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/tests/test-xmlrpc-api/test_mw_getPost.php        2012-07-08 11:10:15 UTC (rev 882)
+++ trunk/tests/test-xmlrpc-api/test_mw_getPost.php        2012-07-08 11:20:24 UTC (rev 883)
</span><span class="lines">@@ -1,141 +1,141 @@
</span><del>-&lt;?php
-
-/**
- * @group xmlrpc
- */
-class TestXMLRPCServer_mw_getPost extends WP_XMLRPC_UnitTestCase {
-        var $post_data;
-        var $post_id;
-        var $post_date_ts;
-
-        function setUp() {
-                parent::setUp();
-
-                $author_id = $this-&gt;make_user_by_role( 'author' );
-                $this-&gt;post_date_ts = strtotime( '+1 day' );
-                $this-&gt;post_data = array(
-                        'post_title' =&gt; rand_str(),
-                        'post_content' =&gt; rand_str( 2000 ),
-                        'post_excerpt' =&gt; rand_str( 100 ),
-                        'post_author' =&gt; $author_id,
-                        'post_date'  =&gt; strftime( &quot;%Y-%m-%d %H:%M:%S&quot;, $this-&gt;post_date_ts ),
-                );
-                $this-&gt;post_id = wp_insert_post( $this-&gt;post_data );
-        }
-
-        function test_invalid_username_password() {
-                $result = $this-&gt;myxmlrpcserver-&gt;mw_getPost( array( $this-&gt;post_id, 'username', 'password' ) );
-                $this-&gt;assertInstanceOf( 'IXR_Error', $result );
-                $this-&gt;assertEquals( 403, $result-&gt;code );
-        }
-
-        function test_incapable_user() {
-                $this-&gt;make_user_by_role( 'subscriber' );
-
-                $result = $this-&gt;myxmlrpcserver-&gt;mw_getPost( array( $this-&gt;post_id, 'subscriber', 'subscriber' ) );
-                $this-&gt;assertInstanceOf( 'IXR_Error', $result );
-                $this-&gt;assertEquals( 401, $result-&gt;code );
-        }
-
-        function test_invalid_postid() {
-                $this-&gt;knownWPBug(20336);
-
-                $result = $this-&gt;myxmlrpcserver-&gt;mw_getPost( array( 9999, 'author', 'author' ) );
-                $this-&gt;assertInstanceOf( 'IXR_Error', $result );
-                $this-&gt;assertEquals( 404, $result-&gt;code );
-        }
-
-        function test_valid_post() {
-                add_theme_support( 'post-thumbnails' );
-
-                $fields = array( 'post' );
-                $result = $this-&gt;myxmlrpcserver-&gt;mw_getPost( array( $this-&gt;post_id, 'author', 'author' ) );
-                $this-&gt;assertNotInstanceOf( 'IXR_Error', $result );
-
-                // Check data types
-                $this-&gt;assertInternalType( 'string', $result['userid'] );
-                $this-&gt;assertInternalType( 'int', $result['postid'] );
-                $this-&gt;assertInternalType( 'string', $result['description'] );
-                $this-&gt;assertInternalType( 'string', $result['title'] );
-                $this-&gt;assertInternalType( 'string', $result['link'] );
-                $this-&gt;assertInternalType( 'string', $result['permaLink'] );
-                $this-&gt;assertInternalType( 'array',  $result['categories'] );
-                $this-&gt;assertInternalType( 'string', $result['mt_excerpt'] );
-                $this-&gt;assertInternalType( 'string', $result['mt_text_more'] );
-                $this-&gt;assertInternalType( 'string', $result['wp_more_text'] );
-                $this-&gt;assertInternalType( 'int', $result['mt_allow_comments'] );
-                $this-&gt;assertInternalType( 'int', $result['mt_allow_pings'] );
-                $this-&gt;assertInternalType( 'string', $result['mt_keywords'] );
-                $this-&gt;assertInternalType( 'string', $result['wp_slug'] );
-                $this-&gt;assertInternalType( 'string', $result['wp_password'] );
-                $this-&gt;assertInternalType( 'string', $result['wp_author_id'] );
-                $this-&gt;assertInternalType( 'string', $result['wp_author_display_name'] );
-                $this-&gt;assertInternalType( 'string', $result['post_status'] );
-                $this-&gt;assertInternalType( 'array', $result['custom_fields'] );
-                $this-&gt;assertInternalType( 'string', $result['wp_post_format'] );
-                $this-&gt;assertInternalType( 'bool',   $result['sticky'] );
-
-
-                // Check expected values
-                $this-&gt;assertStringMatchesFormat( '%d', $result['userid'] );
-                $this-&gt;assertEquals( $this-&gt;post_data['post_title'], $result['title'] );
-                $this-&gt;assertEquals( 'draft', $result['post_status'] );
-                $this-&gt;assertStringMatchesFormat( '%d', $result['wp_author_id'] );
-                $this-&gt;assertEquals( $this-&gt;post_data['post_excerpt'], $result['mt_excerpt'] );
-                $this-&gt;assertEquals( url_to_postid( $result['link'] ), $this-&gt;post_id );
-
-                $this-&gt;assertEquals( '', $result['wp_post_thumbnail'] );
-
-                remove_theme_support( 'post-thumbnails' );
-        }
-
-        function test_post_thumbnail() {
-                add_theme_support( 'post-thumbnails' );
-
-                // create attachment
-                $filename = ( DIR_TESTDATA.'/images/a2-small.jpg' );
-                $contents = file_get_contents( $filename );
-                $upload = wp_upload_bits( $filename, null, $contents );
-                $this-&gt;assertTrue( empty( $upload['error'] ) );
-
-                $attachment = array(
-                        'post_title' =&gt; 'Post Thumbnail',
-                        'post_type' =&gt; 'attachment',
-                        'post_mime_type' =&gt; 'image/jpeg',
-                        'guid' =&gt; $upload['url']
-                );
-                $attachment_id = wp_insert_attachment( $attachment, $upload['file'], $this-&gt;post_id );
-
-                set_post_thumbnail( $this-&gt;post_id, $attachment_id );
-
-                $fields = array( 'post' );
-                $result = $this-&gt;myxmlrpcserver-&gt;mw_getPost( array( $this-&gt;post_id, 'author', 'author' ) );
-                $this-&gt;assertNotInstanceOf( 'IXR_Error', $result );
-
-                $this-&gt;assertInternalType( 'string', $result['wp_post_thumbnail'] );
-                $this-&gt;assertStringMatchesFormat( '%d', $result['wp_post_thumbnail'] );
-                $this-&gt;assertEquals( $attachment_id, $result['wp_post_thumbnail'] );
-
-                remove_theme_support( 'post-thumbnails' );
-        }
-
-        function test_date() {
-                $fields = array( 'post' );
-                $result = $this-&gt;myxmlrpcserver-&gt;mw_getPost( array( $this-&gt;post_id, 'author', 'author' ) );
-                $this-&gt;assertNotInstanceOf( 'IXR_Error', $result );
-
-                $this-&gt;assertInstanceOf( 'IXR_Date', $result['dateCreated'] );
-                $this-&gt;assertInstanceOf( 'IXR_Date', $result['date_created_gmt'] );
-                $this-&gt;assertInstanceOf( 'IXR_Date', $result['date_modified'] );
-                $this-&gt;assertInstanceOf( 'IXR_Date', $result['date_modified_gmt'] );
-
-                $this-&gt;assertEquals( $this-&gt;post_date_ts, $result['dateCreated']-&gt;getTimestamp() );
-                $this-&gt;assertEquals( $this-&gt;post_date_ts, $result['date_modified']-&gt;getTimestamp() );
-
-                $post_date_gmt = strtotime( get_gmt_from_date( mysql2date( 'Y-m-d H:i:s', $this-&gt;post_data['post_date'], false ), 'Ymd\TH:i:s' ) );
-                $post_modified_gmt = strtotime( get_gmt_from_date( mysql2date( 'Y-m-d H:i:s', $this-&gt;post_data['post_date'], false ), 'Ymd\TH:i:s' ) );
-
-                $this-&gt;assertEquals( $post_date_gmt, $result['date_created_gmt']-&gt;getTimestamp() );
-                $this-&gt;assertEquals( $post_modified_gmt, $result['date_modified_gmt']-&gt;getTimestamp() );
-        }
-}
</del><ins>+&lt;?php
+
+/**
+ * @group xmlrpc
+ */
+class TestXMLRPCServer_mw_getPost extends WP_XMLRPC_UnitTestCase {
+        var $post_data;
+        var $post_id;
+        var $post_date_ts;
+
+        function setUp() {
+                parent::setUp();
+
+                $author_id = $this-&gt;make_user_by_role( 'author' );
+                $this-&gt;post_date_ts = strtotime( '+1 day' );
+                $this-&gt;post_data = array(
+                        'post_title' =&gt; rand_str(),
+                        'post_content' =&gt; rand_str( 2000 ),
+                        'post_excerpt' =&gt; rand_str( 100 ),
+                        'post_author' =&gt; $author_id,
+                        'post_date'  =&gt; strftime( &quot;%Y-%m-%d %H:%M:%S&quot;, $this-&gt;post_date_ts ),
+                );
+                $this-&gt;post_id = wp_insert_post( $this-&gt;post_data );
+        }
+
+        function test_invalid_username_password() {
+                $result = $this-&gt;myxmlrpcserver-&gt;mw_getPost( array( $this-&gt;post_id, 'username', 'password' ) );
+                $this-&gt;assertInstanceOf( 'IXR_Error', $result );
+                $this-&gt;assertEquals( 403, $result-&gt;code );
+        }
+
+        function test_incapable_user() {
+                $this-&gt;make_user_by_role( 'subscriber' );
+
+                $result = $this-&gt;myxmlrpcserver-&gt;mw_getPost( array( $this-&gt;post_id, 'subscriber', 'subscriber' ) );
+                $this-&gt;assertInstanceOf( 'IXR_Error', $result );
+                $this-&gt;assertEquals( 401, $result-&gt;code );
+        }
+
+        function test_invalid_postid() {
+                $this-&gt;knownWPBug(20336);
+
+                $result = $this-&gt;myxmlrpcserver-&gt;mw_getPost( array( 9999, 'author', 'author' ) );
+                $this-&gt;assertInstanceOf( 'IXR_Error', $result );
+                $this-&gt;assertEquals( 404, $result-&gt;code );
+        }
+
+        function test_valid_post() {
+                add_theme_support( 'post-thumbnails' );
+
+                $fields = array( 'post' );
+                $result = $this-&gt;myxmlrpcserver-&gt;mw_getPost( array( $this-&gt;post_id, 'author', 'author' ) );
+                $this-&gt;assertNotInstanceOf( 'IXR_Error', $result );
+
+                // Check data types
+                $this-&gt;assertInternalType( 'string', $result['userid'] );
+                $this-&gt;assertInternalType( 'int', $result['postid'] );
+                $this-&gt;assertInternalType( 'string', $result['description'] );
+                $this-&gt;assertInternalType( 'string', $result['title'] );
+                $this-&gt;assertInternalType( 'string', $result['link'] );
+                $this-&gt;assertInternalType( 'string', $result['permaLink'] );
+                $this-&gt;assertInternalType( 'array',  $result['categories'] );
+                $this-&gt;assertInternalType( 'string', $result['mt_excerpt'] );
+                $this-&gt;assertInternalType( 'string', $result['mt_text_more'] );
+                $this-&gt;assertInternalType( 'string', $result['wp_more_text'] );
+                $this-&gt;assertInternalType( 'int', $result['mt_allow_comments'] );
+                $this-&gt;assertInternalType( 'int', $result['mt_allow_pings'] );
+                $this-&gt;assertInternalType( 'string', $result['mt_keywords'] );
+                $this-&gt;assertInternalType( 'string', $result['wp_slug'] );
+                $this-&gt;assertInternalType( 'string', $result['wp_password'] );
+                $this-&gt;assertInternalType( 'string', $result['wp_author_id'] );
+                $this-&gt;assertInternalType( 'string', $result['wp_author_display_name'] );
+                $this-&gt;assertInternalType( 'string', $result['post_status'] );
+                $this-&gt;assertInternalType( 'array', $result['custom_fields'] );
+                $this-&gt;assertInternalType( 'string', $result['wp_post_format'] );
+                $this-&gt;assertInternalType( 'bool',   $result['sticky'] );
+
+
+                // Check expected values
+                $this-&gt;assertStringMatchesFormat( '%d', $result['userid'] );
+                $this-&gt;assertEquals( $this-&gt;post_data['post_title'], $result['title'] );
+                $this-&gt;assertEquals( 'draft', $result['post_status'] );
+                $this-&gt;assertStringMatchesFormat( '%d', $result['wp_author_id'] );
+                $this-&gt;assertEquals( $this-&gt;post_data['post_excerpt'], $result['mt_excerpt'] );
+                $this-&gt;assertEquals( url_to_postid( $result['link'] ), $this-&gt;post_id );
+
+                $this-&gt;assertEquals( '', $result['wp_post_thumbnail'] );
+
+                remove_theme_support( 'post-thumbnails' );
+        }
+
+        function test_post_thumbnail() {
+                add_theme_support( 'post-thumbnails' );
+
+                // create attachment
+                $filename = ( DIR_TESTDATA.'/images/a2-small.jpg' );
+                $contents = file_get_contents( $filename );
+                $upload = wp_upload_bits( $filename, null, $contents );
+                $this-&gt;assertTrue( empty( $upload['error'] ) );
+
+                $attachment = array(
+                        'post_title' =&gt; 'Post Thumbnail',
+                        'post_type' =&gt; 'attachment',
+                        'post_mime_type' =&gt; 'image/jpeg',
+                        'guid' =&gt; $upload['url']
+                );
+                $attachment_id = wp_insert_attachment( $attachment, $upload['file'], $this-&gt;post_id );
+
+                set_post_thumbnail( $this-&gt;post_id, $attachment_id );
+
+                $fields = array( 'post' );
+                $result = $this-&gt;myxmlrpcserver-&gt;mw_getPost( array( $this-&gt;post_id, 'author', 'author' ) );
+                $this-&gt;assertNotInstanceOf( 'IXR_Error', $result );
+
+                $this-&gt;assertInternalType( 'string', $result['wp_post_thumbnail'] );
+                $this-&gt;assertStringMatchesFormat( '%d', $result['wp_post_thumbnail'] );
+                $this-&gt;assertEquals( $attachment_id, $result['wp_post_thumbnail'] );
+
+                remove_theme_support( 'post-thumbnails' );
+        }
+
+        function test_date() {
+                $fields = array( 'post' );
+                $result = $this-&gt;myxmlrpcserver-&gt;mw_getPost( array( $this-&gt;post_id, 'author', 'author' ) );
+                $this-&gt;assertNotInstanceOf( 'IXR_Error', $result );
+
+                $this-&gt;assertInstanceOf( 'IXR_Date', $result['dateCreated'] );
+                $this-&gt;assertInstanceOf( 'IXR_Date', $result['date_created_gmt'] );
+                $this-&gt;assertInstanceOf( 'IXR_Date', $result['date_modified'] );
+                $this-&gt;assertInstanceOf( 'IXR_Date', $result['date_modified_gmt'] );
+
+                $this-&gt;assertEquals( $this-&gt;post_date_ts, $result['dateCreated']-&gt;getTimestamp() );
+                $this-&gt;assertEquals( $this-&gt;post_date_ts, $result['date_modified']-&gt;getTimestamp() );
+
+                $post_date_gmt = strtotime( get_gmt_from_date( mysql2date( 'Y-m-d H:i:s', $this-&gt;post_data['post_date'], false ), 'Ymd\TH:i:s' ) );
+                $post_modified_gmt = strtotime( get_gmt_from_date( mysql2date( 'Y-m-d H:i:s', $this-&gt;post_data['post_date'], false ), 'Ymd\TH:i:s' ) );
+
+                $this-&gt;assertEquals( $post_date_gmt, $result['date_created_gmt']-&gt;getTimestamp() );
+                $this-&gt;assertEquals( $post_modified_gmt, $result['date_modified_gmt']-&gt;getTimestamp() );
+        }
+}
</ins><span class="cx">Property changes on: trunk/tests/test-xmlrpc-api/test_mw_getPost.php
</span><span class="cx">___________________________________________________________________
</span></span></pre></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<a id="trunkteststestxmlrpcapitest_mw_getRecentPostsphp"></a>
<div class="modfile"><h4>Modified: trunk/tests/test-xmlrpc-api/test_mw_getRecentPosts.php (882 => 883)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/tests/test-xmlrpc-api/test_mw_getRecentPosts.php        2012-07-08 11:10:15 UTC (rev 882)
+++ trunk/tests/test-xmlrpc-api/test_mw_getRecentPosts.php        2012-07-08 11:20:24 UTC (rev 883)
</span><span class="lines">@@ -1,144 +1,144 @@
</span><del>-&lt;?php
-
-/**
- * @group xmlrpc
- */
-class TestXMLRPCServer_mw_getRecentPosts extends WP_XMLRPC_UnitTestCase {
-        var $post_data;
-        var $post_id;
-        var $post_date_ts;
-
-        function setUp() {
-                parent::setUp();
-
-                $author_id = $this-&gt;make_user_by_role( 'author' );
-                $this-&gt;post_date_ts = strtotime( '+1 day' );
-                $this-&gt;post_data = array(
-                        'post_title' =&gt; rand_str(),
-                        'post_content' =&gt; rand_str( 2000 ),
-                        'post_excerpt' =&gt; rand_str( 100 ),
-                        'post_author' =&gt; $author_id,
-                        'post_date'  =&gt; strftime( &quot;%Y-%m-%d %H:%M:%S&quot;, $this-&gt;post_date_ts ),
-                );
-                $this-&gt;post_id = wp_insert_post( $this-&gt;post_data );
-        }
-
-        function test_invalid_username_password() {
-                $result = $this-&gt;myxmlrpcserver-&gt;mw_getRecentPosts( array( 1, 'username', 'password' ) );
-                $this-&gt;assertInstanceOf( 'IXR_Error', $result );
-                $this-&gt;assertEquals( 403, $result-&gt;code );
-        }
-
-        function test_no_editable_posts() {
-                wp_delete_post( $this-&gt;post_id );
-
-                $result = $this-&gt;myxmlrpcserver-&gt;mw_getRecentPosts( array( 1, 'author', 'author' ) );
-                $this-&gt;assertNotInstanceOf( 'IXR_Error', $result );
-                $this-&gt;assertEquals( 0, count( $result ) );
-        }
-
-        function test_valid_post() {
-                add_theme_support( 'post-thumbnails' );
-
-                $fields = array( 'post' );
-                $results = $this-&gt;myxmlrpcserver-&gt;mw_getRecentPosts( array( 1, 'author', 'author' ) );
-                $this-&gt;assertNotInstanceOf( 'IXR_Error', $results );
-
-                foreach( $results as $result ) {
-                        $post = get_post( $result['postid'] );
-
-                        // Check data types
-                        $this-&gt;assertInternalType( 'string', $result['userid'] );
-                        $this-&gt;assertInternalType( 'string', $result['postid'] );
-                        $this-&gt;assertInternalType( 'string', $result['description'] );
-                        $this-&gt;assertInternalType( 'string', $result['title'] );
-                        $this-&gt;assertInternalType( 'string', $result['link'] );
-                        $this-&gt;assertInternalType( 'string', $result['permaLink'] );
-                        $this-&gt;assertInternalType( 'array',  $result['categories'] );
-                        $this-&gt;assertInternalType( 'string', $result['mt_excerpt'] );
-                        $this-&gt;assertInternalType( 'string', $result['mt_text_more'] );
-                        $this-&gt;assertInternalType( 'string', $result['wp_more_text'] );
-                        $this-&gt;assertInternalType( 'int', $result['mt_allow_comments'] );
-                        $this-&gt;assertInternalType( 'int', $result['mt_allow_pings'] );
-                        $this-&gt;assertInternalType( 'string', $result['mt_keywords'] );
-                        $this-&gt;assertInternalType( 'string', $result['wp_slug'] );
-                        $this-&gt;assertInternalType( 'string', $result['wp_password'] );
-                        $this-&gt;assertInternalType( 'string', $result['wp_author_id'] );
-                        $this-&gt;assertInternalType( 'string', $result['wp_author_display_name'] );
-                        $this-&gt;assertInternalType( 'string', $result['post_status'] );
-                        $this-&gt;assertInternalType( 'array', $result['custom_fields'] );
-                        $this-&gt;assertInternalType( 'string', $result['wp_post_format'] );
-
-                        // Check expected values
-                        $this-&gt;assertStringMatchesFormat( '%d', $result['userid'] );
-                        $this-&gt;assertStringMatchesFormat( '%d', $result['postid'] );
-                        $this-&gt;assertEquals( $post-&gt;post_title, $result['title'] );
-                        $this-&gt;assertEquals( 'draft', $result['post_status'] );
-                        $this-&gt;assertStringMatchesFormat( '%d', $result['wp_author_id'] );
-                        $this-&gt;assertEquals( $post-&gt;post_excerpt, $result['mt_excerpt'] );
-                        $this-&gt;assertEquals( url_to_postid( $result['link'] ), $post-&gt;ID );
-
-                        $this-&gt;assertEquals( '', $result['wp_post_thumbnail'] );
-                }
-
-                remove_theme_support( 'post-thumbnails' );
-        }
-
-        function test_post_thumbnail() {
-                add_theme_support( 'post-thumbnails' );
-
-                // create attachment
-                $filename = ( DIR_TESTDATA.'/images/a2-small.jpg' );
-                $contents = file_get_contents( $filename );
-                $upload = wp_upload_bits( $filename, null, $contents );
-                $this-&gt;assertTrue( empty( $upload['error'] ) );
-
-                $attachment = array(
-                        'post_title' =&gt; 'Post Thumbnail',
-                        'post_type' =&gt; 'attachment',
-                        'post_mime_type' =&gt; 'image/jpeg',
-                        'guid' =&gt; $upload['url']
-                );
-                $attachment_id = wp_insert_attachment( $attachment, $upload['file'], $this-&gt;post_id );
-                set_post_thumbnail( $this-&gt;post_id, $attachment_id );
-
-                $results = $this-&gt;myxmlrpcserver-&gt;mw_getRecentPosts( array( $this-&gt;post_id, 'author', 'author' ) );
-                $this-&gt;assertNotInstanceOf( 'IXR_Error', $results );
-
-                foreach( $results as $result ) {
-                        $this-&gt;assertInternalType( 'string', $result['wp_post_thumbnail'] );
-                        $this-&gt;assertStringMatchesFormat( '%d', $result['wp_post_thumbnail'] );
-
-                        if( ! empty( $result['wp_post_thumbnail'] ) || $result['postid'] == $this-&gt;post_id ) {
-                                $attachment_id = get_post_meta( $result['postid'], '_thumbnail_id', true );
-
-                                $this-&gt;assertEquals( $attachment_id, $result['wp_post_thumbnail'] );
-                        }
-                }
-
-                remove_theme_support( 'post-thumbnails' );
-        }
-
-        function test_date() {
-                $this-&gt;make_user_by_role( 'editor' );
-
-                $results = $this-&gt;myxmlrpcserver-&gt;mw_getRecentPosts( array( 1, 'editor', 'editor' ) );
-                $this-&gt;assertNotInstanceOf( 'IXR_Error', $results );
-
-                foreach( $results as $result ) {
-                        $post = get_post( $result['postid'] );
-                        $date_gmt = strtotime( get_gmt_from_date( mysql2date( 'Y-m-d H:i:s', $post-&gt;post_date, false ), 'Ymd\TH:i:s' ) );
-                        $date_modified_gmt = strtotime( get_gmt_from_date( mysql2date( 'Y-m-d H:i:s', $post-&gt;post_modified, false ), 'Ymd\TH:i:s' ) );
-
-                        $this-&gt;assertInstanceOf( 'IXR_Date', $result['dateCreated'] );
-                        $this-&gt;assertInstanceOf( 'IXR_Date', $result['date_created_gmt'] );
-                        $this-&gt;assertInstanceOf( 'IXR_Date', $result['date_modified'] );
-                        $this-&gt;assertInstanceOf( 'IXR_Date', $result['date_modified_gmt'] );
-
-                        $this-&gt;assertEquals( strtotime( $post-&gt;post_date ), $result['dateCreated']-&gt;getTimestamp() );
-                        $this-&gt;assertEquals( $date_gmt, $result['date_created_gmt']-&gt;getTimestamp() );
-                        $this-&gt;assertEquals( strtotime( $post-&gt;post_date ), $result['date_modified']-&gt;getTimestamp() );
-                        $this-&gt;assertEquals( $date_modified_gmt, $result['date_modified_gmt']-&gt;getTimestamp() );
-                }
-        }
-}
</del><ins>+&lt;?php
+
+/**
+ * @group xmlrpc
+ */
+class TestXMLRPCServer_mw_getRecentPosts extends WP_XMLRPC_UnitTestCase {
+        var $post_data;
+        var $post_id;
+        var $post_date_ts;
+
+        function setUp() {
+                parent::setUp();
+
+                $author_id = $this-&gt;make_user_by_role( 'author' );
+                $this-&gt;post_date_ts = strtotime( '+1 day' );
+                $this-&gt;post_data = array(
+                        'post_title' =&gt; rand_str(),
+                        'post_content' =&gt; rand_str( 2000 ),
+                        'post_excerpt' =&gt; rand_str( 100 ),
+                        'post_author' =&gt; $author_id,
+                        'post_date'  =&gt; strftime( &quot;%Y-%m-%d %H:%M:%S&quot;, $this-&gt;post_date_ts ),
+                );
+                $this-&gt;post_id = wp_insert_post( $this-&gt;post_data );
+        }
+
+        function test_invalid_username_password() {
+                $result = $this-&gt;myxmlrpcserver-&gt;mw_getRecentPosts( array( 1, 'username', 'password' ) );
+                $this-&gt;assertInstanceOf( 'IXR_Error', $result );
+                $this-&gt;assertEquals( 403, $result-&gt;code );
+        }
+
+        function test_no_editable_posts() {
+                wp_delete_post( $this-&gt;post_id );
+
+                $result = $this-&gt;myxmlrpcserver-&gt;mw_getRecentPosts( array( 1, 'author', 'author' ) );
+                $this-&gt;assertNotInstanceOf( 'IXR_Error', $result );
+                $this-&gt;assertEquals( 0, count( $result ) );
+        }
+
+        function test_valid_post() {
+                add_theme_support( 'post-thumbnails' );
+
+                $fields = array( 'post' );
+                $results = $this-&gt;myxmlrpcserver-&gt;mw_getRecentPosts( array( 1, 'author', 'author' ) );
+                $this-&gt;assertNotInstanceOf( 'IXR_Error', $results );
+
+                foreach( $results as $result ) {
+                        $post = get_post( $result['postid'] );
+
+                        // Check data types
+                        $this-&gt;assertInternalType( 'string', $result['userid'] );
+                        $this-&gt;assertInternalType( 'string', $result['postid'] );
+                        $this-&gt;assertInternalType( 'string', $result['description'] );
+                        $this-&gt;assertInternalType( 'string', $result['title'] );
+                        $this-&gt;assertInternalType( 'string', $result['link'] );
+                        $this-&gt;assertInternalType( 'string', $result['permaLink'] );
+                        $this-&gt;assertInternalType( 'array',  $result['categories'] );
+                        $this-&gt;assertInternalType( 'string', $result['mt_excerpt'] );
+                        $this-&gt;assertInternalType( 'string', $result['mt_text_more'] );
+                        $this-&gt;assertInternalType( 'string', $result['wp_more_text'] );
+                        $this-&gt;assertInternalType( 'int', $result['mt_allow_comments'] );
+                        $this-&gt;assertInternalType( 'int', $result['mt_allow_pings'] );
+                        $this-&gt;assertInternalType( 'string', $result['mt_keywords'] );
+                        $this-&gt;assertInternalType( 'string', $result['wp_slug'] );
+                        $this-&gt;assertInternalType( 'string', $result['wp_password'] );
+                        $this-&gt;assertInternalType( 'string', $result['wp_author_id'] );
+                        $this-&gt;assertInternalType( 'string', $result['wp_author_display_name'] );
+                        $this-&gt;assertInternalType( 'string', $result['post_status'] );
+                        $this-&gt;assertInternalType( 'array', $result['custom_fields'] );
+                        $this-&gt;assertInternalType( 'string', $result['wp_post_format'] );
+
+                        // Check expected values
+                        $this-&gt;assertStringMatchesFormat( '%d', $result['userid'] );
+                        $this-&gt;assertStringMatchesFormat( '%d', $result['postid'] );
+                        $this-&gt;assertEquals( $post-&gt;post_title, $result['title'] );
+                        $this-&gt;assertEquals( 'draft', $result['post_status'] );
+                        $this-&gt;assertStringMatchesFormat( '%d', $result['wp_author_id'] );
+                        $this-&gt;assertEquals( $post-&gt;post_excerpt, $result['mt_excerpt'] );
+                        $this-&gt;assertEquals( url_to_postid( $result['link'] ), $post-&gt;ID );
+
+                        $this-&gt;assertEquals( '', $result['wp_post_thumbnail'] );
+                }
+
+                remove_theme_support( 'post-thumbnails' );
+        }
+
+        function test_post_thumbnail() {
+                add_theme_support( 'post-thumbnails' );
+
+                // create attachment
+                $filename = ( DIR_TESTDATA.'/images/a2-small.jpg' );
+                $contents = file_get_contents( $filename );
+                $upload = wp_upload_bits( $filename, null, $contents );
+                $this-&gt;assertTrue( empty( $upload['error'] ) );
+
+                $attachment = array(
+                        'post_title' =&gt; 'Post Thumbnail',
+                        'post_type' =&gt; 'attachment',
+                        'post_mime_type' =&gt; 'image/jpeg',
+                        'guid' =&gt; $upload['url']
+                );
+                $attachment_id = wp_insert_attachment( $attachment, $upload['file'], $this-&gt;post_id );
+                set_post_thumbnail( $this-&gt;post_id, $attachment_id );
+
+                $results = $this-&gt;myxmlrpcserver-&gt;mw_getRecentPosts( array( $this-&gt;post_id, 'author', 'author' ) );
+                $this-&gt;assertNotInstanceOf( 'IXR_Error', $results );
+
+                foreach( $results as $result ) {
+                        $this-&gt;assertInternalType( 'string', $result['wp_post_thumbnail'] );
+                        $this-&gt;assertStringMatchesFormat( '%d', $result['wp_post_thumbnail'] );
+
+                        if( ! empty( $result['wp_post_thumbnail'] ) || $result['postid'] == $this-&gt;post_id ) {
+                                $attachment_id = get_post_meta( $result['postid'], '_thumbnail_id', true );
+
+                                $this-&gt;assertEquals( $attachment_id, $result['wp_post_thumbnail'] );
+                        }
+                }
+
+                remove_theme_support( 'post-thumbnails' );
+        }
+
+        function test_date() {
+                $this-&gt;make_user_by_role( 'editor' );
+
+                $results = $this-&gt;myxmlrpcserver-&gt;mw_getRecentPosts( array( 1, 'editor', 'editor' ) );
+                $this-&gt;assertNotInstanceOf( 'IXR_Error', $results );
+
+                foreach( $results as $result ) {
+                        $post = get_post( $result['postid'] );
+                        $date_gmt = strtotime( get_gmt_from_date( mysql2date( 'Y-m-d H:i:s', $post-&gt;post_date, false ), 'Ymd\TH:i:s' ) );
+                        $date_modified_gmt = strtotime( get_gmt_from_date( mysql2date( 'Y-m-d H:i:s', $post-&gt;post_modified, false ), 'Ymd\TH:i:s' ) );
+
+                        $this-&gt;assertInstanceOf( 'IXR_Date', $result['dateCreated'] );
+                        $this-&gt;assertInstanceOf( 'IXR_Date', $result['date_created_gmt'] );
+                        $this-&gt;assertInstanceOf( 'IXR_Date', $result['date_modified'] );
+                        $this-&gt;assertInstanceOf( 'IXR_Date', $result['date_modified_gmt'] );
+
+                        $this-&gt;assertEquals( strtotime( $post-&gt;post_date ), $result['dateCreated']-&gt;getTimestamp() );
+                        $this-&gt;assertEquals( $date_gmt, $result['date_created_gmt']-&gt;getTimestamp() );
+                        $this-&gt;assertEquals( strtotime( $post-&gt;post_date ), $result['date_modified']-&gt;getTimestamp() );
+                        $this-&gt;assertEquals( $date_modified_gmt, $result['date_modified_gmt']-&gt;getTimestamp() );
+                }
+        }
+}
</ins><span class="cx">Property changes on: trunk/tests/test-xmlrpc-api/test_mw_getRecentPosts.php
</span><span class="cx">___________________________________________________________________
</span></span></pre></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<a id="trunkteststestxmlrpcapitest_wp_deletePostphp"></a>
<div class="modfile"><h4>Modified: trunk/tests/test-xmlrpc-api/test_wp_deletePost.php (882 => 883)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/tests/test-xmlrpc-api/test_wp_deletePost.php        2012-07-08 11:10:15 UTC (rev 882)
+++ trunk/tests/test-xmlrpc-api/test_wp_deletePost.php        2012-07-08 11:20:24 UTC (rev 883)
</span><span class="lines">@@ -1,42 +1,42 @@
</span><del>-&lt;?php
-
-/**
- * @group xmlrpc
- */
-class TestXMLRPCServer_wp_deletePost extends WP_XMLRPC_UnitTestCase {
-
-        function test_invalid_username_password() {
-                $result = $this-&gt;myxmlrpcserver-&gt;wp_deletePost( array( 1, 'username', 'password', 0 ) );
-                $this-&gt;assertInstanceOf( 'IXR_Error', $result );
-                $this-&gt;assertEquals( 403, $result-&gt;code );
-        }
-
-        function test_invalid_post() {
-                $this-&gt;make_user_by_role( 'editor' );
-
-                $result = $this-&gt;myxmlrpcserver-&gt;wp_deletePost( array( 1, 'editor', 'editor', 0 ) );
-                $this-&gt;assertInstanceOf( 'IXR_Error', $result );
-                $this-&gt;assertEquals( 404, $result-&gt;code );
-        }
-
-        function test_incapable_user() {
-                $this-&gt;make_user_by_role( 'subscriber' );
-                $post_id = $this-&gt;factory-&gt;post-&gt;create();
-
-                $result = $this-&gt;myxmlrpcserver-&gt;wp_deletePost( array( 1, 'subscriber', 'subscriber', $post_id ) );
-                $this-&gt;assertInstanceOf( 'IXR_Error', $result );
-                $this-&gt;assertEquals( 401, $result-&gt;code );
-        }
-
-        function test_post_deleted() {
-                $this-&gt;make_user_by_role( 'editor' );
-                $post_id = $this-&gt;factory-&gt;post-&gt;create();
-
-                $result = $this-&gt;myxmlrpcserver-&gt;wp_deletePost( array( 1, 'editor', 'editor', $post_id ) );
-                $this-&gt;assertNotInstanceOf( 'IXR_Error', $result );
-                $this-&gt;assertTrue( $result );
-
-                $post = get_post( $post_id );
-                $this-&gt;assertEquals( 'trash', $post-&gt;post_status );
-        }
</del><ins>+&lt;?php
+
+/**
+ * @group xmlrpc
+ */
+class TestXMLRPCServer_wp_deletePost extends WP_XMLRPC_UnitTestCase {
+
+        function test_invalid_username_password() {
+                $result = $this-&gt;myxmlrpcserver-&gt;wp_deletePost( array( 1, 'username', 'password', 0 ) );
+                $this-&gt;assertInstanceOf( 'IXR_Error', $result );
+                $this-&gt;assertEquals( 403, $result-&gt;code );
+        }
+
+        function test_invalid_post() {
+                $this-&gt;make_user_by_role( 'editor' );
+
+                $result = $this-&gt;myxmlrpcserver-&gt;wp_deletePost( array( 1, 'editor', 'editor', 0 ) );
+                $this-&gt;assertInstanceOf( 'IXR_Error', $result );
+                $this-&gt;assertEquals( 404, $result-&gt;code );
+        }
+
+        function test_incapable_user() {
+                $this-&gt;make_user_by_role( 'subscriber' );
+                $post_id = $this-&gt;factory-&gt;post-&gt;create();
+
+                $result = $this-&gt;myxmlrpcserver-&gt;wp_deletePost( array( 1, 'subscriber', 'subscriber', $post_id ) );
+                $this-&gt;assertInstanceOf( 'IXR_Error', $result );
+                $this-&gt;assertEquals( 401, $result-&gt;code );
+        }
+
+        function test_post_deleted() {
+                $this-&gt;make_user_by_role( 'editor' );
+                $post_id = $this-&gt;factory-&gt;post-&gt;create();
+
+                $result = $this-&gt;myxmlrpcserver-&gt;wp_deletePost( array( 1, 'editor', 'editor', $post_id ) );
+                $this-&gt;assertNotInstanceOf( 'IXR_Error', $result );
+                $this-&gt;assertTrue( $result );
+
+                $post = get_post( $post_id );
+                $this-&gt;assertEquals( 'trash', $post-&gt;post_status );
+        }
</ins><span class="cx"> }
</span><span class="cx">\ No newline at end of file
</span><span class="cx">Property changes on: trunk/tests/test-xmlrpc-api/test_wp_deletePost.php
</span><span class="cx">___________________________________________________________________
</span></span></pre></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<a id="trunkteststestxmlrpcapitest_wp_deleteTermphp"></a>
<div class="modfile"><h4>Modified: trunk/tests/test-xmlrpc-api/test_wp_deleteTerm.php (882 => 883)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/tests/test-xmlrpc-api/test_wp_deleteTerm.php        2012-07-08 11:10:15 UTC (rev 882)
+++ trunk/tests/test-xmlrpc-api/test_wp_deleteTerm.php        2012-07-08 11:20:24 UTC (rev 883)
</span><span class="lines">@@ -1,73 +1,73 @@
</span><del>-&lt;?php
-
-/**
- * @group xmlrpc
- */
-class TestXMLRPCServer_wp_deleteTerm extends WP_XMLRPC_UnitTestCase {
-        var $term;
-
-        function setUp() {
-                parent::setUp();
-
-                $this-&gt;term = wp_insert_term( 'term' . rand_str() , 'category' );
-        }
-
-        function test_invalid_username_password() {
-                $result = $this-&gt;myxmlrpcserver-&gt;wp_deleteTerm( array( 1, 'username', 'password', 'category', 0 ) );
-                $this-&gt;assertInstanceOf( 'IXR_Error', $result );
-                $this-&gt;assertEquals( 403, $result-&gt;code );
-        }
-
-        function test_empty_taxonomy() {
-                $this-&gt;make_user_by_role( 'subscriber' );
-
-                $result = $this-&gt;myxmlrpcserver-&gt;wp_deleteTerm( array( 1, 'subscriber', 'subscriber', '', 0 ) );
-                $this-&gt;assertInstanceOf( 'IXR_Error', $result );
-                $this-&gt;assertEquals( 403, $result-&gt;code );
-                $this-&gt;assertEquals( __( 'Invalid taxonomy' ), $result-&gt;message );
-        }
-
-        function test_invalid_taxonomy() {
-                $this-&gt;make_user_by_role( 'subscriber' );
-
-                $result = $this-&gt;myxmlrpcserver-&gt;wp_deleteTerm( array( 1, 'subscriber', 'subscriber', 'not_existing', 0 ) );
-                $this-&gt;assertInstanceOf( 'IXR_Error', $result );
-                $this-&gt;assertEquals( 403, $result-&gt;code );
-                $this-&gt;assertEquals( __( 'Invalid taxonomy' ), $result-&gt;message );
-        }
-
-        function test_incapable_user() {
-                $this-&gt;make_user_by_role( 'subscriber' );
-
-                $result = $this-&gt;myxmlrpcserver-&gt;wp_deleteTerm( array( 1, 'subscriber', 'subscriber', 'category', $this-&gt;term['term_id'] ) );
-                $this-&gt;assertInstanceOf( 'IXR_Error', $result );
-                $this-&gt;assertEquals( 401, $result-&gt;code );
-                $this-&gt;assertEquals( __( 'You are not allowed to delete terms in this taxonomy.' ), $result-&gt;message );
-        }
-
-        function test_empty_term() {
-                $this-&gt;make_user_by_role( 'editor' );
-
-                $result = $this-&gt;myxmlrpcserver-&gt;wp_deleteTerm( array( 1, 'editor', 'editor', 'category', '' ) );
-                $this-&gt;assertInstanceOf( 'IXR_Error', $result );
-                $this-&gt;assertEquals( 500, $result-&gt;code );
-                $this-&gt;assertEquals( __('Empty Term'), $result-&gt;message );
-        }
-
-        function test_invalid_term() {
-                $this-&gt;make_user_by_role( 'editor' );
-
-                $result = $this-&gt;myxmlrpcserver-&gt;wp_deleteTerm( array( 1, 'editor', 'editor', 'category', 9999 ) );
-                $this-&gt;assertInstanceOf( 'IXR_Error', $result );
-                $this-&gt;assertEquals( 404, $result-&gt;code );
-                $this-&gt;assertEquals( __('Invalid term ID'), $result-&gt;message );
-        }
-
-        function test_term_deleted() {
-                $this-&gt;make_user_by_role( 'editor' );
-
-                $result = $this-&gt;myxmlrpcserver-&gt;wp_deleteTerm( array( 1, 'editor', 'editor', 'category', $this-&gt;term['term_id'] ) );
-                $this-&gt;assertNotInstanceOf( 'IXR_Error', $result );
-                $this-&gt;assertInternalType( 'boolean', $result );
-        }
-}
</del><ins>+&lt;?php
+
+/**
+ * @group xmlrpc
+ */
+class TestXMLRPCServer_wp_deleteTerm extends WP_XMLRPC_UnitTestCase {
+        var $term;
+
+        function setUp() {
+                parent::setUp();
+
+                $this-&gt;term = wp_insert_term( 'term' . rand_str() , 'category' );
+        }
+
+        function test_invalid_username_password() {
+                $result = $this-&gt;myxmlrpcserver-&gt;wp_deleteTerm( array( 1, 'username', 'password', 'category', 0 ) );
+                $this-&gt;assertInstanceOf( 'IXR_Error', $result );
+                $this-&gt;assertEquals( 403, $result-&gt;code );
+        }
+
+        function test_empty_taxonomy() {
+                $this-&gt;make_user_by_role( 'subscriber' );
+
+                $result = $this-&gt;myxmlrpcserver-&gt;wp_deleteTerm( array( 1, 'subscriber', 'subscriber', '', 0 ) );
+                $this-&gt;assertInstanceOf( 'IXR_Error', $result );
+                $this-&gt;assertEquals( 403, $result-&gt;code );
+                $this-&gt;assertEquals( __( 'Invalid taxonomy' ), $result-&gt;message );
+        }
+
+        function test_invalid_taxonomy() {
+                $this-&gt;make_user_by_role( 'subscriber' );
+
+                $result = $this-&gt;myxmlrpcserver-&gt;wp_deleteTerm( array( 1, 'subscriber', 'subscriber', 'not_existing', 0 ) );
+                $this-&gt;assertInstanceOf( 'IXR_Error', $result );
+                $this-&gt;assertEquals( 403, $result-&gt;code );
+                $this-&gt;assertEquals( __( 'Invalid taxonomy' ), $result-&gt;message );
+        }
+
+        function test_incapable_user() {
+                $this-&gt;make_user_by_role( 'subscriber' );
+
+                $result = $this-&gt;myxmlrpcserver-&gt;wp_deleteTerm( array( 1, 'subscriber', 'subscriber', 'category', $this-&gt;term['term_id'] ) );
+                $this-&gt;assertInstanceOf( 'IXR_Error', $result );
+                $this-&gt;assertEquals( 401, $result-&gt;code );
+                $this-&gt;assertEquals( __( 'You are not allowed to delete terms in this taxonomy.' ), $result-&gt;message );
+        }
+
+        function test_empty_term() {
+                $this-&gt;make_user_by_role( 'editor' );
+
+                $result = $this-&gt;myxmlrpcserver-&gt;wp_deleteTerm( array( 1, 'editor', 'editor', 'category', '' ) );
+                $this-&gt;assertInstanceOf( 'IXR_Error', $result );
+                $this-&gt;assertEquals( 500, $result-&gt;code );
+                $this-&gt;assertEquals( __('Empty Term'), $result-&gt;message );
+        }
+
+        function test_invalid_term() {
+                $this-&gt;make_user_by_role( 'editor' );
+
+                $result = $this-&gt;myxmlrpcserver-&gt;wp_deleteTerm( array( 1, 'editor', 'editor', 'category', 9999 ) );
+                $this-&gt;assertInstanceOf( 'IXR_Error', $result );
+                $this-&gt;assertEquals( 404, $result-&gt;code );
+                $this-&gt;assertEquals( __('Invalid term ID'), $result-&gt;message );
+        }
+
+        function test_term_deleted() {
+                $this-&gt;make_user_by_role( 'editor' );
+
+                $result = $this-&gt;myxmlrpcserver-&gt;wp_deleteTerm( array( 1, 'editor', 'editor', 'category', $this-&gt;term['term_id'] ) );
+                $this-&gt;assertNotInstanceOf( 'IXR_Error', $result );
+                $this-&gt;assertInternalType( 'boolean', $result );
+        }
+}
</ins><span class="cx">Property changes on: trunk/tests/test-xmlrpc-api/test_wp_deleteTerm.php
</span><span class="cx">___________________________________________________________________
</span></span></pre></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<a id="trunkteststestxmlrpcapitest_wp_getCommentphp"></a>
<div class="modfile"><h4>Modified: trunk/tests/test-xmlrpc-api/test_wp_getComment.php (882 => 883)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/tests/test-xmlrpc-api/test_wp_getComment.php        2012-07-08 11:10:15 UTC (rev 882)
+++ trunk/tests/test-xmlrpc-api/test_wp_getComment.php        2012-07-08 11:20:24 UTC (rev 883)
</span><span class="lines">@@ -1,105 +1,105 @@
</span><del>-&lt;?php
-
-/**
- * @group xmlrpc
- */
-class TestXMLRPCServer_wp_getComment extends WP_XMLRPC_UnitTestCase {
-        var $post_id;
-        var $parent_comment_id;
-        var $parent_comment_data;
-        var $child_comment_id;
-        var $child_comment_data;
-
-        function setUp() {
-                parent::setUp();
-
-                $this-&gt;post_id = $this-&gt;factory-&gt;post-&gt;create();
-
-                $this-&gt;parent_comment_data = array(
-                        'comment_post_ID' =&gt; $this-&gt;post_id,
-                        'comment_author' =&gt; 'Test commenter',
-                        'comment_author_url' =&gt; 'http://example.com/',
-                        'comment_author_email' =&gt; 'example@example.com',
-                        'comment_content' =&gt; rand_str( 100 ),
-                );
-                $this-&gt;parent_comment_id = wp_insert_comment( $this-&gt;parent_comment_data );
-
-                $this-&gt;child_comment_data = array(
-                        'comment_post_ID' =&gt; $this-&gt;post_id,
-                        'comment_author' =&gt; 'Test commenter 2',
-                        'comment_author_url' =&gt; 'http://example.org/',
-                        'comment_author_email' =&gt; 'example@example.org',
-                        'comment_parent' =&gt; $this-&gt;parent_comment_id,
-                        'comment_content' =&gt; rand_str( 100 )
-                );
-                $this-&gt;child_comment_id = wp_insert_comment( $this-&gt;child_comment_data );
-        }
-
-        function test_invalid_username_password() {
-                $result = $this-&gt;myxmlrpcserver-&gt;wp_getComment( array( 1, 'username', 'password', $this-&gt;parent_comment_id ) );
-                $this-&gt;assertInstanceOf( 'IXR_Error', $result );
-                $this-&gt;assertEquals( 403, $result-&gt;code );
-        }
-
-        function test_incapable_user() {
-                $this-&gt;make_user_by_role( 'contributor' );
-
-                $result = $this-&gt;myxmlrpcserver-&gt;wp_getComment( array( 1, 'contributor', 'contributor', $this-&gt;parent_comment_id ) );
-                $this-&gt;assertInstanceOf( 'IXR_Error', $result );
-                $this-&gt;assertEquals( 403, $result-&gt;code );
-        }
-
-        function test_valid_comment() {
-                $this-&gt;make_user_by_role( 'editor' );
-
-                $result = $this-&gt;myxmlrpcserver-&gt;wp_getComment( array( 1, 'editor', 'editor', $this-&gt;parent_comment_id ) );
-                $this-&gt;assertNotInstanceOf( 'IXR_Error', $result );
-
-                // Check data types
-                $this-&gt;assertInternalType( 'string', $result['user_id'] );
-                $this-&gt;assertInternalType( 'string', $result['comment_id'] );
-                $this-&gt;assertInstanceOf( 'IXR_Date', $result['date_created_gmt'] );
-                $this-&gt;assertInternalType( 'string', $result['parent'] );
-                $this-&gt;assertInternalType( 'string', $result['status'] );
-                $this-&gt;assertInternalType( 'string', $result['content'] );
-                $this-&gt;assertInternalType( 'string', $result['link'] );
-                $this-&gt;assertInternalType( 'string', $result['post_id'] );
-                $this-&gt;assertInternalType( 'string', $result['post_title'] );
-                $this-&gt;assertInternalType( 'string', $result['author'] );
-                $this-&gt;assertInternalType( 'string', $result['author_url'] );
-                $this-&gt;assertInternalType( 'string', $result['author_email'] );
-                $this-&gt;assertInternalType( 'string', $result['author_ip'] );
-                $this-&gt;assertInternalType( 'string', $result['type'] );
-
-                // Check expected values
-                $this-&gt;assertStringMatchesFormat( '%d', $result['user_id'] );
-                $this-&gt;assertStringMatchesFormat( '%d', $result['comment_id'] );
-                $this-&gt;assertStringMatchesFormat( '%d', $result['parent'] );
-                $this-&gt;assertStringMatchesFormat( '%d', $result['post_id'] );
-                $this-&gt;assertEquals( $this-&gt;parent_comment_id, $result['comment_id'] );
-                $this-&gt;assertEquals( 0, $result['parent'] );
-                $this-&gt;assertEquals( $this-&gt;parent_comment_data['comment_content'], $result['content'] );
-                $this-&gt;assertEquals( $this-&gt;post_id, $result['post_id'] );
-                $this-&gt;assertEquals( $this-&gt;parent_comment_data['comment_author'], $result['author'] );
-                $this-&gt;assertEquals( $this-&gt;parent_comment_data['comment_author_url'], $result['author_url'] );
-                $this-&gt;assertEquals( $this-&gt;parent_comment_data['comment_author_email'], $result['author_email'] );
-        }
-
-        function test_valid_child_comment() {
-                $this-&gt;make_user_by_role( 'editor' );
-
-                $result = $this-&gt;myxmlrpcserver-&gt;wp_getComment( array( 1, 'editor', 'editor', $this-&gt;child_comment_id ) );
-                $this-&gt;assertNotInstanceOf( 'IXR_Error', $result );
-
-                $this-&gt;assertEquals( $this-&gt;child_comment_id, $result['comment_id'] );
-                $this-&gt;assertEquals( $this-&gt;parent_comment_id, $result['parent'] );
-        }
-
-        function test_invalid_id() {
-                $this-&gt;make_user_by_role( 'editor' );
-
-                $result = $this-&gt;myxmlrpcserver-&gt;wp_getComment( array( 1, 'editor', 'editor', 123456789 ) );
-                $this-&gt;assertInstanceOf( 'IXR_Error', $result );
-                $this-&gt;assertEquals( 404, $result-&gt;code );
-        }
</del><ins>+&lt;?php
+
+/**
+ * @group xmlrpc
+ */
+class TestXMLRPCServer_wp_getComment extends WP_XMLRPC_UnitTestCase {
+        var $post_id;
+        var $parent_comment_id;
+        var $parent_comment_data;
+        var $child_comment_id;
+        var $child_comment_data;
+
+        function setUp() {
+                parent::setUp();
+
+                $this-&gt;post_id = $this-&gt;factory-&gt;post-&gt;create();
+
+                $this-&gt;parent_comment_data = array(
+                        'comment_post_ID' =&gt; $this-&gt;post_id,
+                        'comment_author' =&gt; 'Test commenter',
+                        'comment_author_url' =&gt; 'http://example.com/',
+                        'comment_author_email' =&gt; 'example@example.com',
+                        'comment_content' =&gt; rand_str( 100 ),
+                );
+                $this-&gt;parent_comment_id = wp_insert_comment( $this-&gt;parent_comment_data );
+
+                $this-&gt;child_comment_data = array(
+                        'comment_post_ID' =&gt; $this-&gt;post_id,
+                        'comment_author' =&gt; 'Test commenter 2',
+                        'comment_author_url' =&gt; 'http://example.org/',
+                        'comment_author_email' =&gt; 'example@example.org',
+                        'comment_parent' =&gt; $this-&gt;parent_comment_id,
+                        'comment_content' =&gt; rand_str( 100 )
+                );
+                $this-&gt;child_comment_id = wp_insert_comment( $this-&gt;child_comment_data );
+        }
+
+        function test_invalid_username_password() {
+                $result = $this-&gt;myxmlrpcserver-&gt;wp_getComment( array( 1, 'username', 'password', $this-&gt;parent_comment_id ) );
+                $this-&gt;assertInstanceOf( 'IXR_Error', $result );
+                $this-&gt;assertEquals( 403, $result-&gt;code );
+        }
+
+        function test_incapable_user() {
+                $this-&gt;make_user_by_role( 'contributor' );
+
+                $result = $this-&gt;myxmlrpcserver-&gt;wp_getComment( array( 1, 'contributor', 'contributor', $this-&gt;parent_comment_id ) );
+                $this-&gt;assertInstanceOf( 'IXR_Error', $result );
+                $this-&gt;assertEquals( 403, $result-&gt;code );
+        }
+
+        function test_valid_comment() {
+                $this-&gt;make_user_by_role( 'editor' );
+
+                $result = $this-&gt;myxmlrpcserver-&gt;wp_getComment( array( 1, 'editor', 'editor', $this-&gt;parent_comment_id ) );
+                $this-&gt;assertNotInstanceOf( 'IXR_Error', $result );
+
+                // Check data types
+                $this-&gt;assertInternalType( 'string', $result['user_id'] );
+                $this-&gt;assertInternalType( 'string', $result['comment_id'] );
+                $this-&gt;assertInstanceOf( 'IXR_Date', $result['date_created_gmt'] );
+                $this-&gt;assertInternalType( 'string', $result['parent'] );
+                $this-&gt;assertInternalType( 'string', $result['status'] );
+                $this-&gt;assertInternalType( 'string', $result['content'] );
+                $this-&gt;assertInternalType( 'string', $result['link'] );
+                $this-&gt;assertInternalType( 'string', $result['post_id'] );
+                $this-&gt;assertInternalType( 'string', $result['post_title'] );
+                $this-&gt;assertInternalType( 'string', $result['author'] );
+                $this-&gt;assertInternalType( 'string', $result['author_url'] );
+                $this-&gt;assertInternalType( 'string', $result['author_email'] );
+                $this-&gt;assertInternalType( 'string', $result['author_ip'] );
+                $this-&gt;assertInternalType( 'string', $result['type'] );
+
+                // Check expected values
+                $this-&gt;assertStringMatchesFormat( '%d', $result['user_id'] );
+                $this-&gt;assertStringMatchesFormat( '%d', $result['comment_id'] );
+                $this-&gt;assertStringMatchesFormat( '%d', $result['parent'] );
+                $this-&gt;assertStringMatchesFormat( '%d', $result['post_id'] );
+                $this-&gt;assertEquals( $this-&gt;parent_comment_id, $result['comment_id'] );
+                $this-&gt;assertEquals( 0, $result['parent'] );
+                $this-&gt;assertEquals( $this-&gt;parent_comment_data['comment_content'], $result['content'] );
+                $this-&gt;assertEquals( $this-&gt;post_id, $result['post_id'] );
+                $this-&gt;assertEquals( $this-&gt;parent_comment_data['comment_author'], $result['author'] );
+                $this-&gt;assertEquals( $this-&gt;parent_comment_data['comment_author_url'], $result['author_url'] );
+                $this-&gt;assertEquals( $this-&gt;parent_comment_data['comment_author_email'], $result['author_email'] );
+        }
+
+        function test_valid_child_comment() {
+                $this-&gt;make_user_by_role( 'editor' );
+
+                $result = $this-&gt;myxmlrpcserver-&gt;wp_getComment( array( 1, 'editor', 'editor', $this-&gt;child_comment_id ) );
+                $this-&gt;assertNotInstanceOf( 'IXR_Error', $result );
+
+                $this-&gt;assertEquals( $this-&gt;child_comment_id, $result['comment_id'] );
+                $this-&gt;assertEquals( $this-&gt;parent_comment_id, $result['parent'] );
+        }
+
+        function test_invalid_id() {
+                $this-&gt;make_user_by_role( 'editor' );
+
+                $result = $this-&gt;myxmlrpcserver-&gt;wp_getComment( array( 1, 'editor', 'editor', 123456789 ) );
+                $this-&gt;assertInstanceOf( 'IXR_Error', $result );
+                $this-&gt;assertEquals( 404, $result-&gt;code );
+        }
</ins><span class="cx"> }
</span><span class="cx">\ No newline at end of file
</span><span class="cx">Property changes on: trunk/tests/test-xmlrpc-api/test_wp_getComment.php
</span><span class="cx">___________________________________________________________________
</span></span></pre></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<a id="trunkteststestxmlrpcapitest_wp_getCommentsphp"></a>
<div class="modfile"><h4>Modified: trunk/tests/test-xmlrpc-api/test_wp_getComments.php (882 => 883)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/tests/test-xmlrpc-api/test_wp_getComments.php        2012-07-08 11:10:15 UTC (rev 882)
+++ trunk/tests/test-xmlrpc-api/test_wp_getComments.php        2012-07-08 11:20:24 UTC (rev 883)
</span><span class="lines">@@ -1,74 +1,74 @@
</span><del>-&lt;?php
-
-/**
- * @group xmlrpc
- */
-class TestXMLRPCServer_wp_getComments extends WP_XMLRPC_UnitTestCase {
-        var $post_id;
-
-        function setUp() {
-                parent::setUp();
-
-                $this-&gt;post_id = $this-&gt;factory-&gt;post-&gt;create();
-                $this-&gt;factory-&gt;comment-&gt;create_post_comments( $this-&gt;post_id, 15 );
-        }
-
-        function test_invalid_username_password() {
-                $result = $this-&gt;myxmlrpcserver-&gt;wp_getComments( array( 1, 'username', 'password', array() ) );
-                $this-&gt;assertInstanceOf( 'IXR_Error', $result );
-                $this-&gt;assertEquals( 403, $result-&gt;code );
-        }
-
-        function test_incapable_user() {
-                $this-&gt;make_user_by_role( 'contributor' );
-
-                $result = $this-&gt;myxmlrpcserver-&gt;wp_getComments( array( 1, 'contributor', 'contributor', array() ) );
-                $this-&gt;assertInstanceOf( 'IXR_Error', $result );
-                $this-&gt;assertEquals( 401, $result-&gt;code );
-        }
-
-        function test_capable_user() {
-                $this-&gt;make_user_by_role( 'editor' );
-
-                $results = $this-&gt;myxmlrpcserver-&gt;wp_getComments( array( 1, 'editor', 'editor', array() ) );
-                $this-&gt;assertNotInstanceOf( 'IXR_Error', $results );
-
-                foreach( $results as $result ) {
-                        $comment = get_comment( $result['comment_id'], ARRAY_A );
-                        $this-&gt;assertEquals( $comment['comment_post_ID'], $result['post_id'] );
-                }
-        }
-
-        function test_post_filter() {
-                $this-&gt;make_user_by_role( 'editor' );
-
-                $filter = array(
-                        'post_id' =&gt; $this-&gt;post_id
-                );
-                $results = $this-&gt;myxmlrpcserver-&gt;wp_getComments( array( 1, 'editor', 'editor', $filter ) );
-                $this-&gt;assertNotInstanceOf( 'IXR_Error', $results );
-
-                foreach( $results as $result ) {
-                        $this-&gt;assertEquals( $this-&gt;post_id, $result['post_id'] );
-                }
-        }
-
-        function test_number_filter() {
-                $this-&gt;make_user_by_role( 'editor' );
-
-                $filter = array(
-                        'post_id' =&gt; $this-&gt;post_id,
-                );
-                $results = $this-&gt;myxmlrpcserver-&gt;wp_getComments( array( 1, 'editor', 'editor', $filter ) );
-                $this-&gt;assertNotInstanceOf( 'IXR_Error', $results );
-
-                // if no 'number' filter is specified, default should be 10
-                $this-&gt;assertEquals( 10, count( $results ) );
-
-                // explicitly set a 'number' filter and verify that only that many are returned
-                $filter['number'] = 5;
-                $results2 = $this-&gt;myxmlrpcserver-&gt;wp_getComments( array( 1, 'editor', 'editor', $filter ) );
-                $this-&gt;assertNotInstanceOf( 'IXR_Error', $results2 );
-                $this-&gt;assertEquals( 5, count( $results2 ) );
-        }
</del><ins>+&lt;?php
+
+/**
+ * @group xmlrpc
+ */
+class TestXMLRPCServer_wp_getComments extends WP_XMLRPC_UnitTestCase {
+        var $post_id;
+
+        function setUp() {
+                parent::setUp();
+
+                $this-&gt;post_id = $this-&gt;factory-&gt;post-&gt;create();
+                $this-&gt;factory-&gt;comment-&gt;create_post_comments( $this-&gt;post_id, 15 );
+        }
+
+        function test_invalid_username_password() {
+                $result = $this-&gt;myxmlrpcserver-&gt;wp_getComments( array( 1, 'username', 'password', array() ) );
+                $this-&gt;assertInstanceOf( 'IXR_Error', $result );
+                $this-&gt;assertEquals( 403, $result-&gt;code );
+        }
+
+        function test_incapable_user() {
+                $this-&gt;make_user_by_role( 'contributor' );
+
+                $result = $this-&gt;myxmlrpcserver-&gt;wp_getComments( array( 1, 'contributor', 'contributor', array() ) );
+                $this-&gt;assertInstanceOf( 'IXR_Error', $result );
+                $this-&gt;assertEquals( 401, $result-&gt;code );
+        }
+
+        function test_capable_user() {
+                $this-&gt;make_user_by_role( 'editor' );
+
+                $results = $this-&gt;myxmlrpcserver-&gt;wp_getComments( array( 1, 'editor', 'editor', array() ) );
+                $this-&gt;assertNotInstanceOf( 'IXR_Error', $results );
+
+                foreach( $results as $result ) {
+                        $comment = get_comment( $result['comment_id'], ARRAY_A );
+                        $this-&gt;assertEquals( $comment['comment_post_ID'], $result['post_id'] );
+                }
+        }
+
+        function test_post_filter() {
+                $this-&gt;make_user_by_role( 'editor' );
+
+                $filter = array(
+                        'post_id' =&gt; $this-&gt;post_id
+                );
+                $results = $this-&gt;myxmlrpcserver-&gt;wp_getComments( array( 1, 'editor', 'editor', $filter ) );
+                $this-&gt;assertNotInstanceOf( 'IXR_Error', $results );
+
+                foreach( $results as $result ) {
+                        $this-&gt;assertEquals( $this-&gt;post_id, $result['post_id'] );
+                }
+        }
+
+        function test_number_filter() {
+                $this-&gt;make_user_by_role( 'editor' );
+
+                $filter = array(
+                        'post_id' =&gt; $this-&gt;post_id,
+                );
+                $results = $this-&gt;myxmlrpcserver-&gt;wp_getComments( array( 1, 'editor', 'editor', $filter ) );
+                $this-&gt;assertNotInstanceOf( 'IXR_Error', $results );
+
+                // if no 'number' filter is specified, default should be 10
+                $this-&gt;assertEquals( 10, count( $results ) );
+
+                // explicitly set a 'number' filter and verify that only that many are returned
+                $filter['number'] = 5;
+                $results2 = $this-&gt;myxmlrpcserver-&gt;wp_getComments( array( 1, 'editor', 'editor', $filter ) );
+                $this-&gt;assertNotInstanceOf( 'IXR_Error', $results2 );
+                $this-&gt;assertEquals( 5, count( $results2 ) );
+        }
</ins><span class="cx"> }
</span><span class="cx">\ No newline at end of file
</span><span class="cx">Property changes on: trunk/tests/test-xmlrpc-api/test_wp_getComments.php
</span><span class="cx">___________________________________________________________________
</span></span></pre></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<a id="trunkteststestxmlrpcapitest_wp_getMediaItemphp"></a>
<div class="modfile"><h4>Modified: trunk/tests/test-xmlrpc-api/test_wp_getMediaItem.php (882 => 883)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/tests/test-xmlrpc-api/test_wp_getMediaItem.php        2012-07-08 11:10:15 UTC (rev 882)
+++ trunk/tests/test-xmlrpc-api/test_wp_getMediaItem.php        2012-07-08 11:20:24 UTC (rev 883)
</span><span class="lines">@@ -1,78 +1,78 @@
</span><del>-&lt;?php
-
-/**
- * @group xmlrpc
- */
-class TestXMLRPCServer_wp_getMediaItem extends WP_XMLRPC_UnitTestCase {
-        var $post_id;
-        var $attachment_data;
-        var $attachment_id;
-
-        function setUp() {
-                parent::setUp();
-
-                add_theme_support( 'post-thumbnails' );
-
-                $this-&gt;post_id = wp_insert_post( array(
-                        'post_title' =&gt; rand_str(),
-                        'post_content' =&gt; rand_str(),
-                        'post_status' =&gt; 'publish'
-                ));
-
-                $filename = ( DIR_TESTDATA.'/images/waffles.jpg' );
-                $contents = file_get_contents( $filename );
-                $upload = wp_upload_bits(basename($filename), null, $contents);
-                $mime = wp_check_filetype( $filename );
-                $this-&gt;attachment_data = array(
-                        'post_title' =&gt; basename( $upload['file'] ),
-                        'post_content' =&gt; '',
-                        'post_type' =&gt; 'attachment',
-                        'post_parent' =&gt; $this-&gt;post_id,
-                        'post_mime_type' =&gt; $mime['type'],
-                        'guid' =&gt; $upload[ 'url' ]
-                );
-
-                $id = wp_insert_attachment( $this-&gt;attachment_data, $upload[ 'file' ], $this-&gt;post_id );
-                wp_update_attachment_metadata( $id, wp_generate_attachment_metadata( $id, $upload['file'] ) );
-                $this-&gt;attachment_id = $id;
-
-                set_post_thumbnail( $this-&gt;post_id, $this-&gt;attachment_id );
-        }
-
-        function tearDown() {
-                remove_theme_support( 'post-thumbnails' );
-
-                parent::tearDown();
-        }
-
-        function test_invalid_username_password() {
-                $result = $this-&gt;myxmlrpcserver-&gt;wp_getMediaItem( array( 1, 'username', 'password', 0 ) );
-                $this-&gt;assertInstanceOf( 'IXR_Error', $result );
-                $this-&gt;assertEquals( 403, $result-&gt;code );
-        }
-
-        function test_valid_media_item() {
-                $this-&gt;make_user_by_role( 'author' );
-
-                $fields = array( 'post' );
-                $result = $this-&gt;myxmlrpcserver-&gt;wp_getMediaItem( array( 1, 'author', 'author', $this-&gt;attachment_id, $fields ) );
-                $this-&gt;assertNotInstanceOf( 'IXR_Error', $result );
-
-                // Check data types
-                $this-&gt;assertInternalType( 'string', $result['attachment_id'] );
-                $this-&gt;assertInternalType( 'int', $result['parent'] );
-                $this-&gt;assertInternalType( 'string', $result['title'] );
-                $this-&gt;assertInstanceOf( 'IXR_Date', $result['date_created_gmt'] );
-                $this-&gt;assertInternalType( 'string', $result['caption'] );
-                $this-&gt;assertInternalType( 'string', $result['description'] );
-                $this-&gt;assertInternalType( 'string', $result['link'] );
-                $this-&gt;assertInternalType( 'string', $result['thumbnail'] );
-                $this-&gt;assertInternalType( 'array', $result['metadata'] );
-
-                // Check expected values
-                $this-&gt;assertStringMatchesFormat( '%d', $result['attachment_id'] );
-                $this-&gt;assertEquals( $this-&gt;attachment_data['post_title'], $result['title'] );
-                $this-&gt;assertEquals( wp_get_attachment_url( $this-&gt;attachment_id ), $result['link'] );
-                $this-&gt;assertEquals( wp_get_attachment_thumb_url( $this-&gt;attachment_id ), $result['thumbnail'] );
-        }
-}
</del><ins>+&lt;?php
+
+/**
+ * @group xmlrpc
+ */
+class TestXMLRPCServer_wp_getMediaItem extends WP_XMLRPC_UnitTestCase {
+        var $post_id;
+        var $attachment_data;
+        var $attachment_id;
+
+        function setUp() {
+                parent::setUp();
+
+                add_theme_support( 'post-thumbnails' );
+
+                $this-&gt;post_id = wp_insert_post( array(
+                        'post_title' =&gt; rand_str(),
+                        'post_content' =&gt; rand_str(),
+                        'post_status' =&gt; 'publish'
+                ));
+
+                $filename = ( DIR_TESTDATA.'/images/waffles.jpg' );
+                $contents = file_get_contents( $filename );
+                $upload = wp_upload_bits(basename($filename), null, $contents);
+                $mime = wp_check_filetype( $filename );
+                $this-&gt;attachment_data = array(
+                        'post_title' =&gt; basename( $upload['file'] ),
+                        'post_content' =&gt; '',
+                        'post_type' =&gt; 'attachment',
+                        'post_parent' =&gt; $this-&gt;post_id,
+                        'post_mime_type' =&gt; $mime['type'],
+                        'guid' =&gt; $upload[ 'url' ]
+                );
+
+                $id = wp_insert_attachment( $this-&gt;attachment_data, $upload[ 'file' ], $this-&gt;post_id );
+                wp_update_attachment_metadata( $id, wp_generate_attachment_metadata( $id, $upload['file'] ) );
+                $this-&gt;attachment_id = $id;
+
+                set_post_thumbnail( $this-&gt;post_id, $this-&gt;attachment_id );
+        }
+
+        function tearDown() {
+                remove_theme_support( 'post-thumbnails' );
+
+                parent::tearDown();
+        }
+
+        function test_invalid_username_password() {
+                $result = $this-&gt;myxmlrpcserver-&gt;wp_getMediaItem( array( 1, 'username', 'password', 0 ) );
+                $this-&gt;assertInstanceOf( 'IXR_Error', $result );
+                $this-&gt;assertEquals( 403, $result-&gt;code );
+        }
+
+        function test_valid_media_item() {
+                $this-&gt;make_user_by_role( 'author' );
+
+                $fields = array( 'post' );
+                $result = $this-&gt;myxmlrpcserver-&gt;wp_getMediaItem( array( 1, 'author', 'author', $this-&gt;attachment_id, $fields ) );
+                $this-&gt;assertNotInstanceOf( 'IXR_Error', $result );
+
+                // Check data types
+                $this-&gt;assertInternalType( 'string', $result['attachment_id'] );
+                $this-&gt;assertInternalType( 'int', $result['parent'] );
+                $this-&gt;assertInternalType( 'string', $result['title'] );
+                $this-&gt;assertInstanceOf( 'IXR_Date', $result['date_created_gmt'] );
+                $this-&gt;assertInternalType( 'string', $result['caption'] );
+                $this-&gt;assertInternalType( 'string', $result['description'] );
+                $this-&gt;assertInternalType( 'string', $result['link'] );
+                $this-&gt;assertInternalType( 'string', $result['thumbnail'] );
+                $this-&gt;assertInternalType( 'array', $result['metadata'] );
+
+                // Check expected values
+                $this-&gt;assertStringMatchesFormat( '%d', $result['attachment_id'] );
+                $this-&gt;assertEquals( $this-&gt;attachment_data['post_title'], $result['title'] );
+                $this-&gt;assertEquals( wp_get_attachment_url( $this-&gt;attachment_id ), $result['link'] );
+                $this-&gt;assertEquals( wp_get_attachment_thumb_url( $this-&gt;attachment_id ), $result['thumbnail'] );
+        }
+}
</ins><span class="cx">Property changes on: trunk/tests/test-xmlrpc-api/test_wp_getMediaItem.php
</span><span class="cx">___________________________________________________________________
</span></span></pre></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<a id="trunkteststestxmlrpcapitest_wp_getPagephp"></a>
<div class="modfile"><h4>Modified: trunk/tests/test-xmlrpc-api/test_wp_getPage.php (882 => 883)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/tests/test-xmlrpc-api/test_wp_getPage.php        2012-07-08 11:10:15 UTC (rev 882)
+++ trunk/tests/test-xmlrpc-api/test_wp_getPage.php        2012-07-08 11:20:24 UTC (rev 883)
</span><span class="lines">@@ -1,101 +1,101 @@
</span><del>-&lt;?php
-
-/**
- * @group xmlrpc
- */
-class TestXMLRPCServer_wp_getPage extends WP_XMLRPC_UnitTestCase {
-        var $post_data;
-        var $post_id;
-        var $post_date_ts;
-
-        function setUp() {
-                parent::setUp();
-
-                $this-&gt;post_date_ts = strtotime( '+1 day' );
-                $this-&gt;post_data = array(
-                        'post_type' =&gt; 'page',
-                        'post_title' =&gt; rand_str(),
-                        'post_content' =&gt; rand_str( 2000 ),
-                        'post_excerpt' =&gt; rand_str( 100 ),
-                        'post_author' =&gt; $this-&gt;make_user_by_role( 'author' ),
-                        'post_date'  =&gt; strftime( &quot;%Y-%m-%d %H:%M:%S&quot;, $this-&gt;post_date_ts ),
-                );
-                $this-&gt;post_id = wp_insert_post( $this-&gt;post_data );
-        }
-
-        function tearDown() {
-                parent::tearDown();
-
-                wp_delete_post( $this-&gt;post_id );
-        }
-
-        function test_invalid_username_password() {
-                $result = $this-&gt;myxmlrpcserver-&gt;wp_getPage( array( 1, $this-&gt;post_id, 'username', 'password' ) );
-                $this-&gt;assertInstanceOf( 'IXR_Error', $result );
-                $this-&gt;assertEquals( 403, $result-&gt;code );
-        }
-
-        function test_invalid_pageid() {
-                $this-&gt;knownWPBug(20336);
-
-                $this-&gt;make_user_by_role( 'editor' );
-
-                $result = $this-&gt;myxmlrpcserver-&gt;wp_getPage( array( 1, 9999, 'editor', 'editor' ) );
-                $this-&gt;assertInstanceOf( 'IXR_Error', $result );
-                $this-&gt;assertEquals( 404, $result-&gt;code );
-        }
-
-        function test_valid_page() {
-                $this-&gt;make_user_by_role( 'editor' );
-
-                $result = $this-&gt;myxmlrpcserver-&gt;wp_getPage( array( 1, $this-&gt;post_id, 'editor', 'editor' ) );
-                $this-&gt;assertNotInstanceOf( 'IXR_Error', $result );
-
-                // Check data types
-                $this-&gt;assertInternalType( 'string', $result['userid'] );
-                $this-&gt;assertInternalType( 'int',    $result['page_id'] );
-                $this-&gt;assertInternalType( 'string', $result['page_status'] );
-                $this-&gt;assertInternalType( 'string', $result['description'] );
-                $this-&gt;assertInternalType( 'string', $result['title'] );
-                $this-&gt;assertInternalType( 'string', $result['link'] );
-                $this-&gt;assertInternalType( 'string', $result['permaLink'] );
-                $this-&gt;assertInternalType( 'array',  $result['categories'] );
-                $this-&gt;assertInternalType( 'string', $result['excerpt'] );
-                $this-&gt;assertInternalType( 'string', $result['text_more'] );
-                $this-&gt;assertInternalType( 'int',    $result['mt_allow_comments'] );
-                $this-&gt;assertInternalType( 'int',    $result['mt_allow_pings'] );
-                $this-&gt;assertInternalType( 'string', $result['wp_slug'] );
-                $this-&gt;assertInternalType( 'string', $result['wp_password'] );
-                $this-&gt;assertInternalType( 'string', $result['wp_author'] );
-                $this-&gt;assertInternalType( 'int',    $result['wp_page_parent_id'] );
-                $this-&gt;assertInternalType( 'string', $result['wp_page_parent_title'] );
-                $this-&gt;assertInternalType( 'int',    $result['wp_page_order'] );
-                $this-&gt;assertInternalType( 'string', $result['wp_author_id'] );
-                $this-&gt;assertInternalType( 'string', $result['wp_author_display_name'] );
-                $this-&gt;assertInternalType( 'array',  $result['custom_fields'] );
-                $this-&gt;assertInternalType( 'string', $result['wp_page_template'] );
-
-                // Check expected values
-                $this-&gt;assertStringMatchesFormat( '%d', $result['userid'] );
-                $this-&gt;assertEquals( 'draft', $result['page_status'] );
-                $this-&gt;assertEquals( $this-&gt;post_data['post_title'], $result['title'] );
-                $this-&gt;assertEquals( url_to_postid( $result['link'] ), $this-&gt;post_id );
-                $this-&gt;assertEquals( $this-&gt;post_data['post_excerpt'], $result['excerpt'] );
-                $this-&gt;assertStringMatchesFormat( '%d', $result['wp_author_id'] );
-        }
-
-        function test_date() {
-                $this-&gt;make_user_by_role( 'editor' );
-
-                $result = $this-&gt;myxmlrpcserver-&gt;wp_getPage( array( 1, $this-&gt;post_id, 'editor', 'editor' ) );
-                $this-&gt;assertNotInstanceOf( 'IXR_Error', $result );
-
-                $this-&gt;assertInstanceOf( 'IXR_Date', $result['dateCreated'] );
-                $this-&gt;assertInstanceOf( 'IXR_Date', $result['date_created_gmt'] );
-
-                $date_gmt = strtotime( get_gmt_from_date( mysql2date( 'Y-m-d H:i:s', $this-&gt;post_data['post_date'], false ), 'Ymd\TH:i:s' ) );
-
-                $this-&gt;assertEquals( $this-&gt;post_date_ts, $result['dateCreated']-&gt;getTimestamp() );
-                $this-&gt;assertEquals( $date_gmt, $result['date_created_gmt']-&gt;getTimestamp() );
-        }
-}
</del><ins>+&lt;?php
+
+/**
+ * @group xmlrpc
+ */
+class TestXMLRPCServer_wp_getPage extends WP_XMLRPC_UnitTestCase {
+        var $post_data;
+        var $post_id;
+        var $post_date_ts;
+
+        function setUp() {
+                parent::setUp();
+
+                $this-&gt;post_date_ts = strtotime( '+1 day' );
+                $this-&gt;post_data = array(
+                        'post_type' =&gt; 'page',
+                        'post_title' =&gt; rand_str(),
+                        'post_content' =&gt; rand_str( 2000 ),
+                        'post_excerpt' =&gt; rand_str( 100 ),
+                        'post_author' =&gt; $this-&gt;make_user_by_role( 'author' ),
+                        'post_date'  =&gt; strftime( &quot;%Y-%m-%d %H:%M:%S&quot;, $this-&gt;post_date_ts ),
+                );
+                $this-&gt;post_id = wp_insert_post( $this-&gt;post_data );
+        }
+
+        function tearDown() {
+                parent::tearDown();
+
+                wp_delete_post( $this-&gt;post_id );
+        }
+
+        function test_invalid_username_password() {
+                $result = $this-&gt;myxmlrpcserver-&gt;wp_getPage( array( 1, $this-&gt;post_id, 'username', 'password' ) );
+                $this-&gt;assertInstanceOf( 'IXR_Error', $result );
+                $this-&gt;assertEquals( 403, $result-&gt;code );
+        }
+
+        function test_invalid_pageid() {
+                $this-&gt;knownWPBug(20336);
+
+                $this-&gt;make_user_by_role( 'editor' );
+
+                $result = $this-&gt;myxmlrpcserver-&gt;wp_getPage( array( 1, 9999, 'editor', 'editor' ) );
+                $this-&gt;assertInstanceOf( 'IXR_Error', $result );
+                $this-&gt;assertEquals( 404, $result-&gt;code );
+        }
+
+        function test_valid_page() {
+                $this-&gt;make_user_by_role( 'editor' );
+
+                $result = $this-&gt;myxmlrpcserver-&gt;wp_getPage( array( 1, $this-&gt;post_id, 'editor', 'editor' ) );
+                $this-&gt;assertNotInstanceOf( 'IXR_Error', $result );
+
+                // Check data types
+                $this-&gt;assertInternalType( 'string', $result['userid'] );
+                $this-&gt;assertInternalType( 'int',    $result['page_id'] );
+                $this-&gt;assertInternalType( 'string', $result['page_status'] );
+                $this-&gt;assertInternalType( 'string', $result['description'] );
+                $this-&gt;assertInternalType( 'string', $result['title'] );
+                $this-&gt;assertInternalType( 'string', $result['link'] );
+                $this-&gt;assertInternalType( 'string', $result['permaLink'] );
+                $this-&gt;assertInternalType( 'array',  $result['categories'] );
+                $this-&gt;assertInternalType( 'string', $result['excerpt'] );
+                $this-&gt;assertInternalType( 'string', $result['text_more'] );
+                $this-&gt;assertInternalType( 'int',    $result['mt_allow_comments'] );
+                $this-&gt;assertInternalType( 'int',    $result['mt_allow_pings'] );
+                $this-&gt;assertInternalType( 'string', $result['wp_slug'] );
+                $this-&gt;assertInternalType( 'string', $result['wp_password'] );
+                $this-&gt;assertInternalType( 'string', $result['wp_author'] );
+                $this-&gt;assertInternalType( 'int',    $result['wp_page_parent_id'] );
+                $this-&gt;assertInternalType( 'string', $result['wp_page_parent_title'] );
+                $this-&gt;assertInternalType( 'int',    $result['wp_page_order'] );
+                $this-&gt;assertInternalType( 'string', $result['wp_author_id'] );
+                $this-&gt;assertInternalType( 'string', $result['wp_author_display_name'] );
+                $this-&gt;assertInternalType( 'array',  $result['custom_fields'] );
+                $this-&gt;assertInternalType( 'string', $result['wp_page_template'] );
+
+                // Check expected values
+                $this-&gt;assertStringMatchesFormat( '%d', $result['userid'] );
+                $this-&gt;assertEquals( 'draft', $result['page_status'] );
+                $this-&gt;assertEquals( $this-&gt;post_data['post_title'], $result['title'] );
+                $this-&gt;assertEquals( url_to_postid( $result['link'] ), $this-&gt;post_id );
+                $this-&gt;assertEquals( $this-&gt;post_data['post_excerpt'], $result['excerpt'] );
+                $this-&gt;assertStringMatchesFormat( '%d', $result['wp_author_id'] );
+        }
+
+        function test_date() {
+                $this-&gt;make_user_by_role( 'editor' );
+
+                $result = $this-&gt;myxmlrpcserver-&gt;wp_getPage( array( 1, $this-&gt;post_id, 'editor', 'editor' ) );
+                $this-&gt;assertNotInstanceOf( 'IXR_Error', $result );
+
+                $this-&gt;assertInstanceOf( 'IXR_Date', $result['dateCreated'] );
+                $this-&gt;assertInstanceOf( 'IXR_Date', $result['date_created_gmt'] );
+
+                $date_gmt = strtotime( get_gmt_from_date( mysql2date( 'Y-m-d H:i:s', $this-&gt;post_data['post_date'], false ), 'Ymd\TH:i:s' ) );
+
+                $this-&gt;assertEquals( $this-&gt;post_date_ts, $result['dateCreated']-&gt;getTimestamp() );
+                $this-&gt;assertEquals( $date_gmt, $result['date_created_gmt']-&gt;getTimestamp() );
+        }
+}
</ins><span class="cx">Property changes on: trunk/tests/test-xmlrpc-api/test_wp_getPage.php
</span><span class="cx">___________________________________________________________________
</span></span></pre></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<a id="trunkteststestxmlrpcapitest_wp_getPageListphp"></a>
<div class="modfile"><h4>Modified: trunk/tests/test-xmlrpc-api/test_wp_getPageList.php (882 => 883)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/tests/test-xmlrpc-api/test_wp_getPageList.php        2012-07-08 11:10:15 UTC (rev 882)
+++ trunk/tests/test-xmlrpc-api/test_wp_getPageList.php        2012-07-08 11:20:24 UTC (rev 883)
</span><span class="lines">@@ -1,57 +1,57 @@
</span><del>-&lt;?php
-
-/**
- * @group xmlrpc
- */
-class TestXMLRPCServer_wp_getPageList extends WP_XMLRPC_UnitTestCase {
-        var $post_data;
-        var $post_id;
-        var $post_date_ts;
-
-        function setUp() {
-                parent::setUp();
-
-                $this-&gt;post_date_ts = strtotime( '+1 day' );
-                $this-&gt;post_data = array(
-                        'post_type' =&gt; 'page',
-                        'post_title' =&gt; rand_str(),
-                        'post_content' =&gt; rand_str( 2000 ),
-                        'post_excerpt' =&gt; rand_str( 100 ),
-                        'post_author' =&gt; $this-&gt;make_user_by_role( 'author' ),
-                        'post_date'  =&gt; strftime( &quot;%Y-%m-%d %H:%M:%S&quot;, $this-&gt;post_date_ts ),
-                );
-                $this-&gt;post_id = wp_insert_post( $this-&gt;post_data );
-        }
-
-        function test_invalid_username_password() {
-                $result = $this-&gt;myxmlrpcserver-&gt;wp_getPageList( array( 1, 'username', 'password' ) );
-                $this-&gt;assertInstanceOf( 'IXR_Error', $result );
-                $this-&gt;assertEquals( 403, $result-&gt;code );
-        }
-
-        function test_incapable_user() {
-                $this-&gt;make_user_by_role( 'contributor' );
-
-                $result = $this-&gt;myxmlrpcserver-&gt;wp_getPageList( array( 1, 'contributor', 'contributor' ) );
-                $this-&gt;assertInstanceOf( 'IXR_Error', $result );
-                $this-&gt;assertEquals( 401, $result-&gt;code );
-        }
-
-        function test_date() {
-                $this-&gt;make_user_by_role( 'editor' );
-
-                $results = $this-&gt;myxmlrpcserver-&gt;wp_getPageList( array( 1, 'editor', 'editor' ) );
-                $this-&gt;assertNotInstanceOf( 'IXR_Error', $results );
-
-                foreach( $results as $result ) {
-                        $page = get_post( $result-&gt;page_id );
-                        $date_gmt = strtotime( get_gmt_from_date( mysql2date( 'Y-m-d H:i:s', $page-&gt;post_date, false ), 'Ymd\TH:i:s' ) );
-
-                        $this-&gt;assertInstanceOf( 'IXR_Date', $result-&gt;dateCreated );
-                        $this-&gt;assertInstanceOf( 'IXR_Date', $result-&gt;date_created_gmt );
-
-                        $this-&gt;assertEquals( strtotime( $page-&gt;post_date ), $result-&gt;dateCreated-&gt;getTimestamp() );
-                        $this-&gt;assertEquals( $date_gmt, $result-&gt;date_created_gmt-&gt;getTimestamp() );
-                }
-        }
-}
</del><ins>+&lt;?php
+
+/**
+ * @group xmlrpc
+ */
+class TestXMLRPCServer_wp_getPageList extends WP_XMLRPC_UnitTestCase {
+        var $post_data;
+        var $post_id;
+        var $post_date_ts;
+
+        function setUp() {
+                parent::setUp();
+
+                $this-&gt;post_date_ts = strtotime( '+1 day' );
+                $this-&gt;post_data = array(
+                        'post_type' =&gt; 'page',
+                        'post_title' =&gt; rand_str(),
+                        'post_content' =&gt; rand_str( 2000 ),
+                        'post_excerpt' =&gt; rand_str( 100 ),
+                        'post_author' =&gt; $this-&gt;make_user_by_role( 'author' ),
+                        'post_date'  =&gt; strftime( &quot;%Y-%m-%d %H:%M:%S&quot;, $this-&gt;post_date_ts ),
+                );
+                $this-&gt;post_id = wp_insert_post( $this-&gt;post_data );
+        }
+
+        function test_invalid_username_password() {
+                $result = $this-&gt;myxmlrpcserver-&gt;wp_getPageList( array( 1, 'username', 'password' ) );
+                $this-&gt;assertInstanceOf( 'IXR_Error', $result );
+                $this-&gt;assertEquals( 403, $result-&gt;code );
+        }
+
+        function test_incapable_user() {
+                $this-&gt;make_user_by_role( 'contributor' );
+
+                $result = $this-&gt;myxmlrpcserver-&gt;wp_getPageList( array( 1, 'contributor', 'contributor' ) );
+                $this-&gt;assertInstanceOf( 'IXR_Error', $result );
+                $this-&gt;assertEquals( 401, $result-&gt;code );
+        }
+
+        function test_date() {
+                $this-&gt;make_user_by_role( 'editor' );
+
+                $results = $this-&gt;myxmlrpcserver-&gt;wp_getPageList( array( 1, 'editor', 'editor' ) );
+                $this-&gt;assertNotInstanceOf( 'IXR_Error', $results );
+
+                foreach( $results as $result ) {
+                        $page = get_post( $result-&gt;page_id );
+                        $date_gmt = strtotime( get_gmt_from_date( mysql2date( 'Y-m-d H:i:s', $page-&gt;post_date, false ), 'Ymd\TH:i:s' ) );
+
+                        $this-&gt;assertInstanceOf( 'IXR_Date', $result-&gt;dateCreated );
+                        $this-&gt;assertInstanceOf( 'IXR_Date', $result-&gt;date_created_gmt );
+
+                        $this-&gt;assertEquals( strtotime( $page-&gt;post_date ), $result-&gt;dateCreated-&gt;getTimestamp() );
+                        $this-&gt;assertEquals( $date_gmt, $result-&gt;date_created_gmt-&gt;getTimestamp() );
+                }
+        }
+}
</ins><span class="cx">Property changes on: trunk/tests/test-xmlrpc-api/test_wp_getPageList.php
</span><span class="cx">___________________________________________________________________
</span></span></pre></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<a id="trunkteststestxmlrpcapitest_wp_getPagesphp"></a>
<div class="modfile"><h4>Modified: trunk/tests/test-xmlrpc-api/test_wp_getPages.php (882 => 883)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/tests/test-xmlrpc-api/test_wp_getPages.php        2012-07-08 11:10:15 UTC (rev 882)
+++ trunk/tests/test-xmlrpc-api/test_wp_getPages.php        2012-07-08 11:20:24 UTC (rev 883)
</span><span class="lines">@@ -1,85 +1,85 @@
</span><del>-&lt;?php
-
-/**
- * @group xmlrpc
- */
-class TestXMLRPCServer_wp_getPages extends WP_XMLRPC_UnitTestCase {
-    var $post_data;
-    var $post_id;
-    var $post_date_ts;
-    var $editor_id;
-
-    function setUp() {
-        parent::setUp();
-
-        $this-&gt;post_date_ts = strtotime( '+1 day' );
-        $this-&gt;post_data = array(
-            'post_type' =&gt; 'page',
-            'post_title' =&gt; rand_str(),
-            'post_content' =&gt; rand_str( 2000 ),
-            'post_excerpt' =&gt; rand_str( 100 ),
-            'post_author' =&gt; $this-&gt;make_user_by_role( 'administrator' ),
-            'post_date'  =&gt; strftime( &quot;%Y-%m-%d %H:%M:%S&quot;, $this-&gt;post_date_ts ),
-        );
-        $this-&gt;post_id = wp_insert_post( $this-&gt;post_data );
-        $this-&gt;editor_id = $this-&gt;make_user_by_role( 'editor' );
-    }
-
-    function test_invalid_username_password() {
-        $result = $this-&gt;myxmlrpcserver-&gt;wp_getPages( array( 1, 'username', 'password' ) );
-        $this-&gt;assertInstanceOf( 'IXR_Error', $result );
-        $this-&gt;assertEquals( 403, $result-&gt;code );
-    }
-
-    function test_incapable_user() {
-                $this-&gt;make_user_by_role( 'contributor' );
-
-        $result = $this-&gt;myxmlrpcserver-&gt;wp_getPages( array( 1, 'contributor', 'contributor' ) );
-        $this-&gt;assertInstanceOf( 'IXR_Error', $result );
-        $this-&gt;assertEquals( 401, $result-&gt;code );
-    }
-
-    function test_capable_user() {
-        $results = $this-&gt;myxmlrpcserver-&gt;wp_getPages( array( 1, 'administrator', 'administrator' ) );
-        $this-&gt;assertNotInstanceOf( 'IXR_Error', $results );
-
-        foreach( $results as $result ) {
-            $page = get_post( $result['page_id'] );
-            $this-&gt;assertEquals( $page-&gt;post_type, 'page' );
-        }
-    }
-
-    function remove_editor_edit_page_cap( $caps, $cap, $user_id, $args ) {
-        if ( in_array( $cap, array( 'edit_page', 'edit_others_pages' ) ) ) {
-            if ( $user_id == $this-&gt;editor_id &amp;&amp; $args[0] == $this-&gt;post_id ) {
-                return array( false );
-            }
-        }
-
-        return $caps;
-    }
-
-    function test_semi_capable_user() {
-        $this-&gt;knownWPBug( 20629 );
-
-        add_filter( 'map_meta_cap', array( $this, 'remove_editor_edit_page_cap') , 10, 4 );
-
-        $results = $this-&gt;myxmlrpcserver-&gt;wp_getPages( array( 1, 'editor', 'editor' ) );
-        $this-&gt;assertNotInstanceOf( 'IXR_Error', $results );
-
-        $found_incapable = false;
-        foreach( $results as $result ) {
-            // WP#20629
-            $this-&gt;assertNotInstanceOf( 'IXR_Error', $result );
-
-            if ( $result['page_id'] == $this-&gt;post_id ) {
-                $found_incapable = true;
-                break;
-            }
-        }
-        $this-&gt;assertFalse( $found_incapable );
-
-        remove_filter( 'map_meta_cap', array( $this, 'remove_editor_edit_page_cap' ), 10, 4 );
-    }
-
-}
</del><ins>+&lt;?php
+
+/**
+ * @group xmlrpc
+ */
+class TestXMLRPCServer_wp_getPages extends WP_XMLRPC_UnitTestCase {
+    var $post_data;
+    var $post_id;
+    var $post_date_ts;
+    var $editor_id;
+
+    function setUp() {
+        parent::setUp();
+
+        $this-&gt;post_date_ts = strtotime( '+1 day' );
+        $this-&gt;post_data = array(
+            'post_type' =&gt; 'page',
+            'post_title' =&gt; rand_str(),
+            'post_content' =&gt; rand_str( 2000 ),
+            'post_excerpt' =&gt; rand_str( 100 ),
+            'post_author' =&gt; $this-&gt;make_user_by_role( 'administrator' ),
+            'post_date'  =&gt; strftime( &quot;%Y-%m-%d %H:%M:%S&quot;, $this-&gt;post_date_ts ),
+        );
+        $this-&gt;post_id = wp_insert_post( $this-&gt;post_data );
+        $this-&gt;editor_id = $this-&gt;make_user_by_role( 'editor' );
+    }
+
+    function test_invalid_username_password() {
+        $result = $this-&gt;myxmlrpcserver-&gt;wp_getPages( array( 1, 'username', 'password' ) );
+        $this-&gt;assertInstanceOf( 'IXR_Error', $result );
+        $this-&gt;assertEquals( 403, $result-&gt;code );
+    }
+
+    function test_incapable_user() {
+                $this-&gt;make_user_by_role( 'contributor' );
+
+        $result = $this-&gt;myxmlrpcserver-&gt;wp_getPages( array( 1, 'contributor', 'contributor' ) );
+        $this-&gt;assertInstanceOf( 'IXR_Error', $result );
+        $this-&gt;assertEquals( 401, $result-&gt;code );
+    }
+
+    function test_capable_user() {
+        $results = $this-&gt;myxmlrpcserver-&gt;wp_getPages( array( 1, 'administrator', 'administrator' ) );
+        $this-&gt;assertNotInstanceOf( 'IXR_Error', $results );
+
+        foreach( $results as $result ) {
+            $page = get_post( $result['page_id'] );
+            $this-&gt;assertEquals( $page-&gt;post_type, 'page' );
+        }
+    }
+
+    function remove_editor_edit_page_cap( $caps, $cap, $user_id, $args ) {
+        if ( in_array( $cap, array( 'edit_page', 'edit_others_pages' ) ) ) {
+            if ( $user_id == $this-&gt;editor_id &amp;&amp; $args[0] == $this-&gt;post_id ) {
+                return array( false );
+            }
+        }
+
+        return $caps;
+    }
+
+    function test_semi_capable_user() {
+        $this-&gt;knownWPBug( 20629 );
+
+        add_filter( 'map_meta_cap', array( $this, 'remove_editor_edit_page_cap') , 10, 4 );
+
+        $results = $this-&gt;myxmlrpcserver-&gt;wp_getPages( array( 1, 'editor', 'editor' ) );
+        $this-&gt;assertNotInstanceOf( 'IXR_Error', $results );
+
+        $found_incapable = false;
+        foreach( $results as $result ) {
+            // WP#20629
+            $this-&gt;assertNotInstanceOf( 'IXR_Error', $result );
+
+            if ( $result['page_id'] == $this-&gt;post_id ) {
+                $found_incapable = true;
+                break;
+            }
+        }
+        $this-&gt;assertFalse( $found_incapable );
+
+        remove_filter( 'map_meta_cap', array( $this, 'remove_editor_edit_page_cap' ), 10, 4 );
+    }
+
+}
</ins><span class="cx">Property changes on: trunk/tests/test-xmlrpc-api/test_wp_getPages.php
</span><span class="cx">___________________________________________________________________
</span></span></pre></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<a id="trunkteststestxmlrpcapitest_wp_getPostphp"></a>
<div class="modfile"><h4>Modified: trunk/tests/test-xmlrpc-api/test_wp_getPost.php (882 => 883)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/tests/test-xmlrpc-api/test_wp_getPost.php        2012-07-08 11:10:15 UTC (rev 882)
+++ trunk/tests/test-xmlrpc-api/test_wp_getPost.php        2012-07-08 11:20:24 UTC (rev 883)
</span><span class="lines">@@ -1,118 +1,118 @@
</span><del>-&lt;?php
-
-/**
- * @group xmlrpc
- */
-class TestXMLRPCServer_wp_getPost extends WP_XMLRPC_UnitTestCase {
-        var $post_data;
-        var $post_id;
-        var $post_date_ts;
-        var $post_custom_field;
-
-        function setUp() {
-                parent::setUp();
-
-                $this-&gt;post_date_ts = strtotime( '+1 day' );
-                $this-&gt;post_data = array(
-                        'post_title' =&gt; rand_str(),
-                        'post_content' =&gt; rand_str( 2000 ),
-                        'post_excerpt' =&gt; rand_str( 100 ),
-                        'post_author' =&gt; $this-&gt;make_user_by_role( 'author' ),
-                        'post_date'  =&gt; strftime( &quot;%Y-%m-%d %H:%M:%S&quot;, $this-&gt;post_date_ts ),
-                );
-                $this-&gt;post_id = wp_insert_post( $this-&gt;post_data );
-                $this-&gt;post_custom_field = array( 'key' =&gt; 'test_custom_field', 'value' =&gt; 12345678);
-                $this-&gt;post_custom_field['id'] = add_post_meta( $this-&gt;post_id, $this-&gt;post_custom_field['key'], $this-&gt;post_custom_field['value'] );
-        }
-
-        function test_invalid_username_password() {
-                $result = $this-&gt;myxmlrpcserver-&gt;wp_getPost( array( 1, 'username', 'password', 1 ) );
-                $this-&gt;assertInstanceOf( 'IXR_Error', $result );
-                $this-&gt;assertEquals( 403, $result-&gt;code );
-        }
-
-        function test_valid_post() {
-                add_theme_support( 'post-thumbnails' );
-
-                $fields = array( 'post', 'custom_fields' );
-                $result = $this-&gt;myxmlrpcserver-&gt;wp_getPost( array( 1, 'author', 'author', $this-&gt;post_id, $fields ) );
-                $this-&gt;assertNotInstanceOf( 'IXR_Error', $result );
-
-                // Check data types
-                $this-&gt;assertInternalType( 'string', $result['post_id'] );
-                $this-&gt;assertInternalType( 'string', $result['post_title'] );
-                $this-&gt;assertInstanceOf( 'IXR_Date', $result['post_date'] );
-                $this-&gt;assertInstanceOf( 'IXR_Date', $result['post_date_gmt'] );
-                $this-&gt;assertInstanceOf( 'IXR_Date', $result['post_modified'] );
-                $this-&gt;assertInstanceOf( 'IXR_Date', $result['post_modified_gmt'] );
-                $this-&gt;assertInternalType( 'string', $result['post_status'] );
-                $this-&gt;assertInternalType( 'string', $result['post_type'] );
-                $this-&gt;assertInternalType( 'string', $result['post_name'] );
-                $this-&gt;assertInternalType( 'string', $result['post_author'] );
-                $this-&gt;assertInternalType( 'string', $result['post_password'] );
-                $this-&gt;assertInternalType( 'string', $result['post_excerpt'] );
-                $this-&gt;assertInternalType( 'string', $result['post_content'] );
-                $this-&gt;assertInternalType( 'string', $result['link'] );
-                $this-&gt;assertInternalType( 'string', $result['comment_status'] );
-                $this-&gt;assertInternalType( 'string', $result['ping_status'] );
-                $this-&gt;assertInternalType( 'bool', $result['sticky'] );
-                $this-&gt;assertInternalType( 'string', $result['post_format'] );
-                $this-&gt;assertInternalType( 'array', $result['post_thumbnail'] );
-                $this-&gt;assertInternalType( 'array', $result['custom_fields'] );
-
-                // Check expected values
-                $this-&gt;assertStringMatchesFormat( '%d', $result['post_id'] );
-                $this-&gt;assertEquals( $this-&gt;post_data['post_title'], $result['post_title'] );
-                $this-&gt;assertEquals( 'draft', $result['post_status'] );
-                $this-&gt;assertEquals( 'post', $result['post_type'] );
-                $this-&gt;assertStringMatchesFormat( '%d', $result['post_author'] );
-                $this-&gt;assertEquals( $this-&gt;post_data['post_excerpt'], $result['post_excerpt'] );
-                $this-&gt;assertEquals( $this-&gt;post_data['post_content'], $result['post_content'] );
-                $this-&gt;assertEquals( url_to_postid( $result['link'] ), $this-&gt;post_id );
-                $this-&gt;assertEquals( $this-&gt;post_custom_field['id'], $result['custom_fields'][0]['id'] );
-                $this-&gt;assertEquals( $this-&gt;post_custom_field['key'], $result['custom_fields'][0]['key'] );
-                $this-&gt;assertEquals( $this-&gt;post_custom_field['value'], $result['custom_fields'][0]['value'] );
-
-                remove_theme_support( 'post-thumbnails' );
-        }
-
-        function test_no_fields() {
-                $fields = array();
-                $result = $this-&gt;myxmlrpcserver-&gt;wp_getPost( array( 1, 'author', 'author', $this-&gt;post_id, $fields ) );
-                $this-&gt;assertNotInstanceOf( 'IXR_Error', $result );
-
-                // when no fields are requested, only the IDs should be returned
-                $this-&gt;assertEquals( 1, count( $result ) );
-                $this-&gt;assertEquals( array( 'post_id' ), array_keys( $result ) );
-        }
-
-        function test_default_fields() {
-                $result = $this-&gt;myxmlrpcserver-&gt;wp_getPost( array( 1, 'author', 'author', $this-&gt;post_id ) );
-                $this-&gt;assertNotInstanceOf( 'IXR_Error', $result );
-
-                $this-&gt;assertArrayHasKey( 'post_id', $result );
-                $this-&gt;assertArrayHasKey( 'link', $result ); // random field from 'posts' group
-                $this-&gt;assertArrayHasKey( 'terms', $result );
-                $this-&gt;assertArrayHasKey( 'custom_fields', $result );
-        }
-
-        function test_date() {
-                $fields = array( 'post' );
-                $result = $this-&gt;myxmlrpcserver-&gt;wp_getPost( array( 1, 'author', 'author', $this-&gt;post_id, $fields ) );
-                $this-&gt;assertNotInstanceOf( 'IXR_Error', $result );
-
-                $this-&gt;assertInstanceOf( 'IXR_Date', $result['post_date'] );
-                $this-&gt;assertInstanceOf( 'IXR_Date', $result['post_date_gmt'] );
-                $this-&gt;assertInstanceOf( 'IXR_Date', $result['post_modified'] );
-                $this-&gt;assertInstanceOf( 'IXR_Date', $result['post_modified_gmt'] );
-
-                $this-&gt;assertEquals( $this-&gt;post_date_ts, $result['post_date']-&gt;getTimestamp() );
-                $this-&gt;assertEquals( $this-&gt;post_date_ts, $result['post_modified']-&gt;getTimestamp() );
-
-                $post_date_gmt = strtotime( get_gmt_from_date( mysql2date( 'Y-m-d H:i:s', $this-&gt;post_data['post_date'], false ), 'Ymd\TH:i:s' ) );
-                $post_modified_gmt = strtotime( get_gmt_from_date( mysql2date( 'Y-m-d H:i:s', $this-&gt;post_data['post_date'], false ), 'Ymd\TH:i:s' ) );
-
-                $this-&gt;assertEquals( $post_date_gmt, $result['post_date_gmt']-&gt;getTimestamp() );
-                $this-&gt;assertEquals( $post_modified_gmt, $result['post_modified_gmt']-&gt;getTimestamp() );
-        }
-}
</del><ins>+&lt;?php
+
+/**
+ * @group xmlrpc
+ */
+class TestXMLRPCServer_wp_getPost extends WP_XMLRPC_UnitTestCase {
+        var $post_data;
+        var $post_id;
+        var $post_date_ts;
+        var $post_custom_field;
+
+        function setUp() {
+                parent::setUp();
+
+                $this-&gt;post_date_ts = strtotime( '+1 day' );
+                $this-&gt;post_data = array(
+                        'post_title' =&gt; rand_str(),
+                        'post_content' =&gt; rand_str( 2000 ),
+                        'post_excerpt' =&gt; rand_str( 100 ),
+                        'post_author' =&gt; $this-&gt;make_user_by_role( 'author' ),
+                        'post_date'  =&gt; strftime( &quot;%Y-%m-%d %H:%M:%S&quot;, $this-&gt;post_date_ts ),
+                );
+                $this-&gt;post_id = wp_insert_post( $this-&gt;post_data );
+                $this-&gt;post_custom_field = array( 'key' =&gt; 'test_custom_field', 'value' =&gt; 12345678);
+                $this-&gt;post_custom_field['id'] = add_post_meta( $this-&gt;post_id, $this-&gt;post_custom_field['key'], $this-&gt;post_custom_field['value'] );
+        }
+
+        function test_invalid_username_password() {
+                $result = $this-&gt;myxmlrpcserver-&gt;wp_getPost( array( 1, 'username', 'password', 1 ) );
+                $this-&gt;assertInstanceOf( 'IXR_Error', $result );
+                $this-&gt;assertEquals( 403, $result-&gt;code );
+        }
+
+        function test_valid_post() {
+                add_theme_support( 'post-thumbnails' );
+
+                $fields = array( 'post', 'custom_fields' );
+                $result = $this-&gt;myxmlrpcserver-&gt;wp_getPost( array( 1, 'author', 'author', $this-&gt;post_id, $fields ) );
+                $this-&gt;assertNotInstanceOf( 'IXR_Error', $result );
+
+                // Check data types
+                $this-&gt;assertInternalType( 'string', $result['post_id'] );
+                $this-&gt;assertInternalType( 'string', $result['post_title'] );
+                $this-&gt;assertInstanceOf( 'IXR_Date', $result['post_date'] );
+                $this-&gt;assertInstanceOf( 'IXR_Date', $result['post_date_gmt'] );
+                $this-&gt;assertInstanceOf( 'IXR_Date', $result['post_modified'] );
+                $this-&gt;assertInstanceOf( 'IXR_Date', $result['post_modified_gmt'] );
+                $this-&gt;assertInternalType( 'string', $result['post_status'] );
+                $this-&gt;assertInternalType( 'string', $result['post_type'] );
+                $this-&gt;assertInternalType( 'string', $result['post_name'] );
+                $this-&gt;assertInternalType( 'string', $result['post_author'] );
+                $this-&gt;assertInternalType( 'string', $result['post_password'] );
+                $this-&gt;assertInternalType( 'string', $result['post_excerpt'] );
+                $this-&gt;assertInternalType( 'string', $result['post_content'] );
+                $this-&gt;assertInternalType( 'string', $result['link'] );
+                $this-&gt;assertInternalType( 'string', $result['comment_status'] );
+                $this-&gt;assertInternalType( 'string', $result['ping_status'] );
+                $this-&gt;assertInternalType( 'bool', $result['sticky'] );
+                $this-&gt;assertInternalType( 'string', $result['post_format'] );
+                $this-&gt;assertInternalType( 'array', $result['post_thumbnail'] );
+                $this-&gt;assertInternalType( 'array', $result['custom_fields'] );
+
+                // Check expected values
+                $this-&gt;assertStringMatchesFormat( '%d', $result['post_id'] );
+                $this-&gt;assertEquals( $this-&gt;post_data['post_title'], $result['post_title'] );
+                $this-&gt;assertEquals( 'draft', $result['post_status'] );
+                $this-&gt;assertEquals( 'post', $result['post_type'] );
+                $this-&gt;assertStringMatchesFormat( '%d', $result['post_author'] );
+                $this-&gt;assertEquals( $this-&gt;post_data['post_excerpt'], $result['post_excerpt'] );
+                $this-&gt;assertEquals( $this-&gt;post_data['post_content'], $result['post_content'] );
+                $this-&gt;assertEquals( url_to_postid( $result['link'] ), $this-&gt;post_id );
+                $this-&gt;assertEquals( $this-&gt;post_custom_field['id'], $result['custom_fields'][0]['id'] );
+                $this-&gt;assertEquals( $this-&gt;post_custom_field['key'], $result['custom_fields'][0]['key'] );
+                $this-&gt;assertEquals( $this-&gt;post_custom_field['value'], $result['custom_fields'][0]['value'] );
+
+                remove_theme_support( 'post-thumbnails' );
+        }
+
+        function test_no_fields() {
+                $fields = array();
+                $result = $this-&gt;myxmlrpcserver-&gt;wp_getPost( array( 1, 'author', 'author', $this-&gt;post_id, $fields ) );
+                $this-&gt;assertNotInstanceOf( 'IXR_Error', $result );
+
+                // when no fields are requested, only the IDs should be returned
+                $this-&gt;assertEquals( 1, count( $result ) );
+                $this-&gt;assertEquals( array( 'post_id' ), array_keys( $result ) );
+        }
+
+        function test_default_fields() {
+                $result = $this-&gt;myxmlrpcserver-&gt;wp_getPost( array( 1, 'author', 'author', $this-&gt;post_id ) );
+                $this-&gt;assertNotInstanceOf( 'IXR_Error', $result );
+
+                $this-&gt;assertArrayHasKey( 'post_id', $result );
+                $this-&gt;assertArrayHasKey( 'link', $result ); // random field from 'posts' group
+                $this-&gt;assertArrayHasKey( 'terms', $result );
+                $this-&gt;assertArrayHasKey( 'custom_fields', $result );
+        }
+
+        function test_date() {
+                $fields = array( 'post' );
+                $result = $this-&gt;myxmlrpcserver-&gt;wp_getPost( array( 1, 'author', 'author', $this-&gt;post_id, $fields ) );
+                $this-&gt;assertNotInstanceOf( 'IXR_Error', $result );
+
+                $this-&gt;assertInstanceOf( 'IXR_Date', $result['post_date'] );
+                $this-&gt;assertInstanceOf( 'IXR_Date', $result['post_date_gmt'] );
+                $this-&gt;assertInstanceOf( 'IXR_Date', $result['post_modified'] );
+                $this-&gt;assertInstanceOf( 'IXR_Date', $result['post_modified_gmt'] );
+
+                $this-&gt;assertEquals( $this-&gt;post_date_ts, $result['post_date']-&gt;getTimestamp() );
+                $this-&gt;assertEquals( $this-&gt;post_date_ts, $result['post_modified']-&gt;getTimestamp() );
+
+                $post_date_gmt = strtotime( get_gmt_from_date( mysql2date( 'Y-m-d H:i:s', $this-&gt;post_data['post_date'], false ), 'Ymd\TH:i:s' ) );
+                $post_modified_gmt = strtotime( get_gmt_from_date( mysql2date( 'Y-m-d H:i:s', $this-&gt;post_data['post_date'], false ), 'Ymd\TH:i:s' ) );
+
+                $this-&gt;assertEquals( $post_date_gmt, $result['post_date_gmt']-&gt;getTimestamp() );
+                $this-&gt;assertEquals( $post_modified_gmt, $result['post_modified_gmt']-&gt;getTimestamp() );
+        }
+}
</ins><span class="cx">Property changes on: trunk/tests/test-xmlrpc-api/test_wp_getPost.php
</span><span class="cx">___________________________________________________________________
</span></span></pre></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<a id="trunkteststestxmlrpcapitest_wp_getPostTypephp"></a>
<div class="modfile"><h4>Modified: trunk/tests/test-xmlrpc-api/test_wp_getPostType.php (882 => 883)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/tests/test-xmlrpc-api/test_wp_getPostType.php        2012-07-08 11:10:15 UTC (rev 882)
+++ trunk/tests/test-xmlrpc-api/test_wp_getPostType.php        2012-07-08 11:20:24 UTC (rev 883)
</span><span class="lines">@@ -1,132 +1,132 @@
</span><del>-&lt;?php
-
-/**
- * @group xmlrpc
- */
-class TestXMLRPCServer_wp_getPostType extends WP_XMLRPC_UnitTestCase {
-        var $cpt_name;
-        var $cpt_args;
-
-        function setUp() {
-                parent::setUp();
-
-                $this-&gt;cpt_name = 'post_type_test';
-                $this-&gt;cpt_args = array(
-                        'public' =&gt; false,
-                        'show_ui' =&gt; true,
-                        'show_in_menu' =&gt; true,
-                        'menu_position' =&gt; 7,
-                        'menu_icon' =&gt; 'cpt_icon.png',
-                        'taxonomies' =&gt; array( 'category', 'post_tag' ),
-                        'hierarchical' =&gt; true
-                );
-                register_post_type( $this-&gt;cpt_name, $this-&gt;cpt_args );
-        }
-
-        function tearDown() {
-                _unregister_post_type( $this-&gt;cpt_name );
-
-                parent::tearDown();
-        }
-
-        function test_invalid_username_password() {
-                $result = $this-&gt;myxmlrpcserver-&gt;wp_getPostType( array( 1, 'username', 'password', 'post' ) );
-                $this-&gt;assertInstanceOf( 'IXR_Error', $result );
-                $this-&gt;assertEquals( 403, $result-&gt;code );
-        }
-
-        function test_invalid_post_type_name() {
-                $this-&gt;make_user_by_role( 'editor' );
-
-                $result = $this-&gt;myxmlrpcserver-&gt;wp_getPostType( array( 1, 'editor', 'editor', 'foobar' ) );
-                $this-&gt;assertInstanceOf( 'IXR_Error', $result );
-                $this-&gt;assertEquals( 403, $result-&gt;code );
-        }
-
-        function test_valid_post_type_name() {
-                $this-&gt;make_user_by_role( 'editor' );
-
-                $result = $this-&gt;myxmlrpcserver-&gt;wp_getPostType( array( 1, 'editor', 'editor', 'post' ) );
-                $this-&gt;assertNotInstanceOf( 'IXR_Error', $result );
-        }
-
-        function test_incapable_user() {
-                $this-&gt;make_user_by_role( 'subscriber' );
-
-                $result = $this-&gt;myxmlrpcserver-&gt;wp_getPostType( array( 1, 'subscriber', 'subscriber', 'post' ) );
-                $this-&gt;assertInstanceOf( 'IXR_Error', $result );
-                $this-&gt;assertEquals( 401, $result-&gt;code );
-        }
-
-        function test_valid_type() {
-                $this-&gt;make_user_by_role( 'editor' );
-
-                $result = $this-&gt;myxmlrpcserver-&gt;wp_getPostType( array( 1, 'editor', 'editor', $this-&gt;cpt_name, array( 'labels', 'cap', 'menu', 'taxonomies' ) ) );
-                $this-&gt;assertNotInstanceOf( 'IXR_Error', $result );
-
-                // check data types
-                $this-&gt;assertInternalType( 'string', $result['name'] );
-                $this-&gt;assertInternalType( 'string', $result['label'] );
-                $this-&gt;assertInternalType( 'bool', $result['hierarchical'] );
-                $this-&gt;assertInternalType( 'bool', $result['public'] );
-                $this-&gt;assertInternalType( 'bool', $result['_builtin'] );
-                $this-&gt;assertInternalType( 'bool', $result['map_meta_cap'] );
-                $this-&gt;assertInternalType( 'bool', $result['has_archive'] );
-                $this-&gt;assertInternalType( 'bool', $result['show_ui'] );
-                $this-&gt;assertInternalType( 'int', $result['menu_position'] );
-                $this-&gt;assertInternalType( 'string', $result['menu_icon'] );
-                $this-&gt;assertInternalType( 'array', $result['labels'] );
-                $this-&gt;assertInternalType( 'array', $result['cap'] );
-                $this-&gt;assertInternalType( 'array', $result['taxonomies'] );
-                $this-&gt;assertInternalType( 'array', $result['supports'] );
-
-                // check label data types
-                $this-&gt;assertInternalType( 'string', $result['labels']['name'] );
-                $this-&gt;assertInternalType( 'string', $result['labels']['singular_name'] );
-                $this-&gt;assertInternalType( 'string', $result['labels']['add_new'] );
-                $this-&gt;assertInternalType( 'string', $result['labels']['add_new_item'] );
-                $this-&gt;assertInternalType( 'string', $result['labels']['edit_item'] );
-                $this-&gt;assertInternalType( 'string', $result['labels']['new_item'] );
-                $this-&gt;assertInternalType( 'string', $result['labels']['view_item'] );
-                $this-&gt;assertInternalType( 'string', $result['labels']['search_items'] );
-                $this-&gt;assertInternalType( 'string', $result['labels']['not_found'] );
-                $this-&gt;assertInternalType( 'string', $result['labels']['not_found_in_trash'] );
-                $this-&gt;assertInternalType( 'string', $result['labels']['parent_item_colon'] );
-                $this-&gt;assertInternalType( 'string', $result['labels']['all_items'] );
-                $this-&gt;assertInternalType( 'string', $result['labels']['menu_name'] );
-                $this-&gt;assertInternalType( 'string', $result['labels']['name_admin_bar'] );
-
-                // check cap data types
-                $this-&gt;assertInternalType( 'string', $result['cap']['edit_post'] );
-                $this-&gt;assertInternalType( 'string', $result['cap']['read_post'] );
-                $this-&gt;assertInternalType( 'string', $result['cap']['delete_post'] );
-                $this-&gt;assertInternalType( 'string', $result['cap']['edit_posts'] );
-                $this-&gt;assertInternalType( 'string', $result['cap']['edit_others_posts'] );
-                $this-&gt;assertInternalType( 'string', $result['cap']['publish_posts'] );
-                $this-&gt;assertInternalType( 'string', $result['cap']['read_private_posts'] );
-                $this-&gt;assertInternalType( 'string', $result['cap']['read'] );
-                $this-&gt;assertInternalType( 'string', $result['cap']['delete_posts'] );
-                $this-&gt;assertInternalType( 'string', $result['cap']['delete_private_posts'] );
-                $this-&gt;assertInternalType( 'string', $result['cap']['delete_published_posts'] );
-                $this-&gt;assertInternalType( 'string', $result['cap']['delete_others_posts'] );
-                $this-&gt;assertInternalType( 'string', $result['cap']['edit_private_posts'] );
-                $this-&gt;assertInternalType( 'string', $result['cap']['edit_published_posts'] );
-
-                // check taxonomy data types
-                foreach ( $result['taxonomies'] as $taxonomy ) {
-                        $this-&gt;assertInternalType( 'string', $taxonomy );
-                }
-
-                // check taxonomy data types
-                foreach ( $result['supports'] as $key =&gt; $value ) {
-                        $this-&gt;assertInternalType( 'string', $key );
-                        $this-&gt;assertInternalType( 'bool', $value );
-                }
-
-                // Check expected values
-                $this-&gt;assertEquals( $this-&gt;cpt_name, $result['name'] );
-                foreach ( $this-&gt;cpt_args as $key =&gt; $value ) {
-                        $this-&gt;assertEquals( $value, $result[$key] );
-                }
-        }
-}
</del><ins>+&lt;?php
+
+/**
+ * @group xmlrpc
+ */
+class TestXMLRPCServer_wp_getPostType extends WP_XMLRPC_UnitTestCase {
+        var $cpt_name;
+        var $cpt_args;
+
+        function setUp() {
+                parent::setUp();
+
+                $this-&gt;cpt_name = 'post_type_test';
+                $this-&gt;cpt_args = array(
+                        'public' =&gt; false,
+                        'show_ui' =&gt; true,
+                        'show_in_menu' =&gt; true,
+                        'menu_position' =&gt; 7,
+                        'menu_icon' =&gt; 'cpt_icon.png',
+                        'taxonomies' =&gt; array( 'category', 'post_tag' ),
+                        'hierarchical' =&gt; true
+                );
+                register_post_type( $this-&gt;cpt_name, $this-&gt;cpt_args );
+        }
+
+        function tearDown() {
+                _unregister_post_type( $this-&gt;cpt_name );
+
+                parent::tearDown();
+        }
+
+        function test_invalid_username_password() {
+                $result = $this-&gt;myxmlrpcserver-&gt;wp_getPostType( array( 1, 'username', 'password', 'post' ) );
+                $this-&gt;assertInstanceOf( 'IXR_Error', $result );
+                $this-&gt;assertEquals( 403, $result-&gt;code );
+        }
+
+        function test_invalid_post_type_name() {
+                $this-&gt;make_user_by_role( 'editor' );
+
+                $result = $this-&gt;myxmlrpcserver-&gt;wp_getPostType( array( 1, 'editor', 'editor', 'foobar' ) );
+                $this-&gt;assertInstanceOf( 'IXR_Error', $result );
+                $this-&gt;assertEquals( 403, $result-&gt;code );
+        }
+
+        function test_valid_post_type_name() {
+                $this-&gt;make_user_by_role( 'editor' );
+
+                $result = $this-&gt;myxmlrpcserver-&gt;wp_getPostType( array( 1, 'editor', 'editor', 'post' ) );
+                $this-&gt;assertNotInstanceOf( 'IXR_Error', $result );
+        }
+
+        function test_incapable_user() {
+                $this-&gt;make_user_by_role( 'subscriber' );
+
+                $result = $this-&gt;myxmlrpcserver-&gt;wp_getPostType( array( 1, 'subscriber', 'subscriber', 'post' ) );
+                $this-&gt;assertInstanceOf( 'IXR_Error', $result );
+                $this-&gt;assertEquals( 401, $result-&gt;code );
+        }
+
+        function test_valid_type() {
+                $this-&gt;make_user_by_role( 'editor' );
+
+                $result = $this-&gt;myxmlrpcserver-&gt;wp_getPostType( array( 1, 'editor', 'editor', $this-&gt;cpt_name, array( 'labels', 'cap', 'menu', 'taxonomies' ) ) );
+                $this-&gt;assertNotInstanceOf( 'IXR_Error', $result );
+
+                // check data types
+                $this-&gt;assertInternalType( 'string', $result['name'] );
+                $this-&gt;assertInternalType( 'string', $result['label'] );
+                $this-&gt;assertInternalType( 'bool', $result['hierarchical'] );
+                $this-&gt;assertInternalType( 'bool', $result['public'] );
+                $this-&gt;assertInternalType( 'bool', $result['_builtin'] );
+                $this-&gt;assertInternalType( 'bool', $result['map_meta_cap'] );
+                $this-&gt;assertInternalType( 'bool', $result['has_archive'] );
+                $this-&gt;assertInternalType( 'bool', $result['show_ui'] );
+                $this-&gt;assertInternalType( 'int', $result['menu_position'] );
+                $this-&gt;assertInternalType( 'string', $result['menu_icon'] );
+                $this-&gt;assertInternalType( 'array', $result['labels'] );
+                $this-&gt;assertInternalType( 'array', $result['cap'] );
+                $this-&gt;assertInternalType( 'array', $result['taxonomies'] );
+                $this-&gt;assertInternalType( 'array', $result['supports'] );
+
+                // check label data types
+                $this-&gt;assertInternalType( 'string', $result['labels']['name'] );
+                $this-&gt;assertInternalType( 'string', $result['labels']['singular_name'] );
+                $this-&gt;assertInternalType( 'string', $result['labels']['add_new'] );
+                $this-&gt;assertInternalType( 'string', $result['labels']['add_new_item'] );
+                $this-&gt;assertInternalType( 'string', $result['labels']['edit_item'] );
+                $this-&gt;assertInternalType( 'string', $result['labels']['new_item'] );
+                $this-&gt;assertInternalType( 'string', $result['labels']['view_item'] );
+                $this-&gt;assertInternalType( 'string', $result['labels']['search_items'] );
+                $this-&gt;assertInternalType( 'string', $result['labels']['not_found'] );
+                $this-&gt;assertInternalType( 'string', $result['labels']['not_found_in_trash'] );
+                $this-&gt;assertInternalType( 'string', $result['labels']['parent_item_colon'] );
+                $this-&gt;assertInternalType( 'string', $result['labels']['all_items'] );
+                $this-&gt;assertInternalType( 'string', $result['labels']['menu_name'] );
+                $this-&gt;assertInternalType( 'string', $result['labels']['name_admin_bar'] );
+
+                // check cap data types
+                $this-&gt;assertInternalType( 'string', $result['cap']['edit_post'] );
+                $this-&gt;assertInternalType( 'string', $result['cap']['read_post'] );
+                $this-&gt;assertInternalType( 'string', $result['cap']['delete_post'] );
+                $this-&gt;assertInternalType( 'string', $result['cap']['edit_posts'] );
+                $this-&gt;assertInternalType( 'string', $result['cap']['edit_others_posts'] );
+                $this-&gt;assertInternalType( 'string', $result['cap']['publish_posts'] );
+                $this-&gt;assertInternalType( 'string', $result['cap']['read_private_posts'] );
+                $this-&gt;assertInternalType( 'string', $result['cap']['read'] );
+                $this-&gt;assertInternalType( 'string', $result['cap']['delete_posts'] );
+                $this-&gt;assertInternalType( 'string', $result['cap']['delete_private_posts'] );
+                $this-&gt;assertInternalType( 'string', $result['cap']['delete_published_posts'] );
+                $this-&gt;assertInternalType( 'string', $result['cap']['delete_others_posts'] );
+                $this-&gt;assertInternalType( 'string', $result['cap']['edit_private_posts'] );
+                $this-&gt;assertInternalType( 'string', $result['cap']['edit_published_posts'] );
+
+                // check taxonomy data types
+                foreach ( $result['taxonomies'] as $taxonomy ) {
+                        $this-&gt;assertInternalType( 'string', $taxonomy );
+                }
+
+                // check taxonomy data types
+                foreach ( $result['supports'] as $key =&gt; $value ) {
+                        $this-&gt;assertInternalType( 'string', $key );
+                        $this-&gt;assertInternalType( 'bool', $value );
+                }
+
+                // Check expected values
+                $this-&gt;assertEquals( $this-&gt;cpt_name, $result['name'] );
+                foreach ( $this-&gt;cpt_args as $key =&gt; $value ) {
+                        $this-&gt;assertEquals( $value, $result[$key] );
+                }
+        }
+}
</ins><span class="cx">Property changes on: trunk/tests/test-xmlrpc-api/test_wp_getPostType.php
</span><span class="cx">___________________________________________________________________
</span></span></pre></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<a id="trunkteststestxmlrpcapitest_wp_getPostTypesphp"></a>
<div class="modfile"><h4>Modified: trunk/tests/test-xmlrpc-api/test_wp_getPostTypes.php (882 => 883)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/tests/test-xmlrpc-api/test_wp_getPostTypes.php        2012-07-08 11:10:15 UTC (rev 882)
+++ trunk/tests/test-xmlrpc-api/test_wp_getPostTypes.php        2012-07-08 11:20:24 UTC (rev 883)
</span><span class="lines">@@ -1,43 +1,43 @@
</span><del>-&lt;?php
-
-/**
- * @group xmlrpc
- */
-class TestXMLRPCServer_wp_getPostTypes extends WP_XMLRPC_UnitTestCase {
-        function test_invalid_username_password() {
-                $result = $this-&gt;myxmlrpcserver-&gt;wp_getPostTypes( array( 1, 'username', 'password', 'post' ) );
-                $this-&gt;assertInstanceOf( 'IXR_Error', $result );
-                $this-&gt;assertEquals( 403, $result-&gt;code );
-        }
-
-        function test_incapable_user() {
-                $this-&gt;make_user_by_role( 'subscriber' );
-
-                $result = $this-&gt;myxmlrpcserver-&gt;wp_getPostTypes( array( 1, 'subscriber', 'subscriber' ) );
-                $this-&gt;assertNotInstanceOf( 'IXR_Error', $result );
-                $this-&gt;assertInternalType( 'array', $result );
-                $this-&gt;assertEquals( 0, count( $result ) );
-        }
-
-        function test_capable_user() {
-                $this-&gt;make_user_by_role( 'editor' );
-
-                $result = $this-&gt;myxmlrpcserver-&gt;wp_getPostTypes( array( 1, 'editor', 'editor' ) );
-                $this-&gt;assertNotInstanceOf( 'IXR_Error', $result );
-                $this-&gt;assertInternalType( 'array', $result );
-                $this-&gt;assertGreaterThan( 0, count( $result ) );
-        }
-
-        function test_simple_filter() {
-                $this-&gt;make_user_by_role( 'editor' );
-
-                $result = $this-&gt;myxmlrpcserver-&gt;wp_getPostTypes( array( 1, 'editor', 'editor', array( 'hierarchical' =&gt; true ) ) );
-                $this-&gt;assertNotInstanceOf( 'IXR_Error', $result );
-                $this-&gt;assertInternalType( 'array', $result );
-
-                // verify that pages is in the result, and post is not
-                $result_names = wp_list_pluck( $result, 'name' );
-                $this-&gt;assertContains( 'page', $result_names );
-                $this-&gt;assertNotContains( 'post', $result_names );
-        }
</del><ins>+&lt;?php
+
+/**
+ * @group xmlrpc
+ */
+class TestXMLRPCServer_wp_getPostTypes extends WP_XMLRPC_UnitTestCase {
+        function test_invalid_username_password() {
+                $result = $this-&gt;myxmlrpcserver-&gt;wp_getPostTypes( array( 1, 'username', 'password', 'post' ) );
+                $this-&gt;assertInstanceOf( 'IXR_Error', $result );
+                $this-&gt;assertEquals( 403, $result-&gt;code );
+        }
+
+        function test_incapable_user() {
+                $this-&gt;make_user_by_role( 'subscriber' );
+
+                $result = $this-&gt;myxmlrpcserver-&gt;wp_getPostTypes( array( 1, 'subscriber', 'subscriber' ) );
+                $this-&gt;assertNotInstanceOf( 'IXR_Error', $result );
+                $this-&gt;assertInternalType( 'array', $result );
+                $this-&gt;assertEquals( 0, count( $result ) );
+        }
+
+        function test_capable_user() {
+                $this-&gt;make_user_by_role( 'editor' );
+
+                $result = $this-&gt;myxmlrpcserver-&gt;wp_getPostTypes( array( 1, 'editor', 'editor' ) );
+                $this-&gt;assertNotInstanceOf( 'IXR_Error', $result );
+                $this-&gt;assertInternalType( 'array', $result );
+                $this-&gt;assertGreaterThan( 0, count( $result ) );
+        }
+
+        function test_simple_filter() {
+                $this-&gt;make_user_by_role( 'editor' );
+
+                $result = $this-&gt;myxmlrpcserver-&gt;wp_getPostTypes( array( 1, 'editor', 'editor', array( 'hierarchical' =&gt; true ) ) );
+                $this-&gt;assertNotInstanceOf( 'IXR_Error', $result );
+                $this-&gt;assertInternalType( 'array', $result );
+
+                // verify that pages is in the result, and post is not
+                $result_names = wp_list_pluck( $result, 'name' );
+                $this-&gt;assertContains( 'page', $result_names );
+                $this-&gt;assertNotContains( 'post', $result_names );
+        }
</ins><span class="cx"> }
</span><span class="cx">\ No newline at end of file
</span><span class="cx">Property changes on: trunk/tests/test-xmlrpc-api/test_wp_getPostTypes.php
</span><span class="cx">___________________________________________________________________
</span></span></pre></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<a id="trunkteststestxmlrpcapitest_wp_getPostsphp"></a>
<div class="modfile"><h4>Modified: trunk/tests/test-xmlrpc-api/test_wp_getPosts.php (882 => 883)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/tests/test-xmlrpc-api/test_wp_getPosts.php        2012-07-08 11:10:15 UTC (rev 882)
+++ trunk/tests/test-xmlrpc-api/test_wp_getPosts.php        2012-07-08 11:20:24 UTC (rev 883)
</span><span class="lines">@@ -1,129 +1,129 @@
</span><del>-&lt;?php
-
-/**
- * @group xmlrpc
- */
-class TestXMLRPCServer_wp_getPosts extends WP_XMLRPC_UnitTestCase {
-
-        function test_invalid_username_password() {
-                $result = $this-&gt;myxmlrpcserver-&gt;wp_getPosts( array( 1, 'username', 'password' ) );
-                $this-&gt;assertInstanceOf( 'IXR_Error', $result );
-                $this-&gt;assertEquals( 403, $result-&gt;code );
-        }
-
-        function test_incapable_user() {
-                $this-&gt;knownWPBug( 20991 );
-
-                $this-&gt;make_user_by_role( 'subscriber' );
-
-                $result = $this-&gt;myxmlrpcserver-&gt;wp_getPosts( array( 1, 'subscriber', 'subscriber' ) );
-                $this-&gt;assertInstanceOf( 'IXR_Error', $result );
-                $this-&gt;assertEquals( 401, $result-&gt;code );
-
-                $filter = array( 'post_type' =&gt; 'page' );
-                $result = $this-&gt;myxmlrpcserver-&gt;wp_getPosts( array( 1, 'subscriber', 'subscriber', $filter ) );
-                $this-&gt;assertInstanceOf( 'IXR_Error', $result );
-                $this-&gt;assertEquals( 401, $result-&gt;code );
-        }
-
-        function test_capable_user() {
-                $this-&gt;make_user_by_role( 'editor' );
-
-                $result = $this-&gt;myxmlrpcserver-&gt;wp_getPosts( array( 1, 'editor', 'editor' ) );
-                $this-&gt;assertNotInstanceOf( 'IXR_Error', $result );
-        }
-
-        function test_invalid_post_type() {
-                $this-&gt;make_user_by_role( 'editor' );
-
-                $filter = array( 'post_type' =&gt; 'invalid_post_type_name' );
-                $result = $this-&gt;myxmlrpcserver-&gt;wp_getPosts( array( 1, 'editor', 'editor', $filter ) );
-                $this-&gt;assertInstanceOf( 'IXR_Error', $result );
-        }
-
-        function test_filters() {
-                $this-&gt;make_user_by_role( 'editor' );
-
-                $cpt_name = 'test_wp_getposts_cpt';
-                register_post_type( $cpt_name, array(
-                        'taxonomies' =&gt; array( 'post_tag', 'category' ),
-                        'public' =&gt; true
-                ));
-
-                $num_posts = 17;
-                $post_ids = $this-&gt;factory-&gt;post-&gt;create_many( $num_posts, array( 'post_type' =&gt; $cpt_name ) );
-
-                // get them all
-                $filter = array( 'post_type' =&gt; $cpt_name, 'number' =&gt; $num_posts + 10 );
-                $results = $this-&gt;myxmlrpcserver-&gt;wp_getPosts( array( 1, 'editor', 'editor', $filter ) );
-                $this-&gt;assertNotInstanceOf( 'IXR_Error', $results );
-                $this-&gt;assertEquals( $num_posts, count( $results ) );
-
-                // page through results
-                $posts_found = array();
-                $filter['number'] = 5;
-                $filter['offset'] = 0;
-                do {
-                        $presults = $this-&gt;myxmlrpcserver-&gt;wp_getPosts( array( 1, 'editor', 'editor', $filter ) );
-                        foreach( $presults as $post ) {
-                                $posts_found[] = $post['post_id'];
-                        }
-                        $filter['offset'] += $filter['number'];
-                } while ( count( $presults ) &gt; 0 );
-                // verify that $post_ids matches $posts_found
-                $this-&gt;assertEquals( 0, count( array_diff( $post_ids, $posts_found ) ) );
-
-                // add comments to some of the posts
-                $random_posts = array_rand( $post_ids, $num_posts / 2 );
-                foreach ( $random_posts as $i ) {
-                        $post = $post_ids[$i];
-                        $this-&gt;factory-&gt;comment-&gt;create_post_comments( $post, rand( 1, 20 ) );
-                }
-
-                // get results ordered by comment count
-                $filter2 = array( 'post_type' =&gt; $cpt_name, 'number' =&gt; $num_posts, 'orderby' =&gt; 'comment_count', 'order' =&gt; 'DESC' );
-                $results2 = $this-&gt;myxmlrpcserver-&gt;wp_getPosts( array( 1, 'editor', 'editor', $filter2 ) );
-                $this-&gt;assertNotInstanceOf( 'IXR_Error', $results2 );
-                $last_comment_count = 100;
-                foreach ( $results2 as $post ) {
-                        $comment_count = intval( get_comments_number( $post['post_id'] ) );
-                        $this-&gt;assertLessThanOrEqual( $last_comment_count, $comment_count );
-                        $last_comment_count = $comment_count;
-                }
-
-                // set one of the posts to draft and get drafts
-                $post = get_post( $post_ids[$random_posts[0]] );
-                $post-&gt;post_status = 'draft';
-                wp_update_post( $post );
-                $filter3 = array( 'post_type' =&gt; $cpt_name, 'post_status' =&gt; 'draft' );
-                $results3 = $this-&gt;myxmlrpcserver-&gt;wp_getPosts( array( 1, 'editor', 'editor', $filter3 ) );
-                $this-&gt;assertNotInstanceOf( 'IXR_Error', $results3 );
-                $this-&gt;assertEquals( 1, count( $results3 ) );
-                $this-&gt;assertEquals( $post-&gt;ID, $results3[0]['post_id'] );
-
-                _unregister_post_type( $cpt_name );
-        }
-
-        function test_fields() {
-                $this-&gt;make_user_by_role( 'editor' );
-                $this-&gt;factory-&gt;post-&gt;create();
-
-                // check default fields
-                $results = $this-&gt;myxmlrpcserver-&gt;wp_getPosts( array( 1, 'editor', 'editor' ) );
-                $this-&gt;assertNotInstanceOf( 'IXR_Error', $results );
-                $expected_fields = array( 'post_id', 'post_title', 'terms', 'custom_fields', 'link' ); // subset of expected fields
-                foreach( $expected_fields as $field ) {
-                        $this-&gt;assertArrayHasKey( $field, $results[0] );
-                }
-
-                // request specific fields and verify that only those are returned
-                $filter = array();
-                $fields = array( 'post_name', 'post_author', 'enclosure' );
-                $results2 = $this-&gt;myxmlrpcserver-&gt;wp_getPosts( array( 1, 'editor', 'editor', $filter, $fields ) );
-                $this-&gt;assertNotInstanceOf( 'IXR_Error', $results2 );
-                $expected_fields = array_merge( $fields, array( 'post_id' ) );
-                foreach ( array_keys( $results2[0] ) as $field ) {
-                        $this-&gt;assertContains( $field, $expected_fields );
-                }
-        }
</del><ins>+&lt;?php
+
+/**
+ * @group xmlrpc
+ */
+class TestXMLRPCServer_wp_getPosts extends WP_XMLRPC_UnitTestCase {
+
+        function test_invalid_username_password() {
+                $result = $this-&gt;myxmlrpcserver-&gt;wp_getPosts( array( 1, 'username', 'password' ) );
+                $this-&gt;assertInstanceOf( 'IXR_Error', $result );
+                $this-&gt;assertEquals( 403, $result-&gt;code );
+        }
+
+        function test_incapable_user() {
+                $this-&gt;knownWPBug( 20991 );
+
+                $this-&gt;make_user_by_role( 'subscriber' );
+
+                $result = $this-&gt;myxmlrpcserver-&gt;wp_getPosts( array( 1, 'subscriber', 'subscriber' ) );
+                $this-&gt;assertInstanceOf( 'IXR_Error', $result );
+                $this-&gt;assertEquals( 401, $result-&gt;code );
+
+                $filter = array( 'post_type' =&gt; 'page' );
+                $result = $this-&gt;myxmlrpcserver-&gt;wp_getPosts( array( 1, 'subscriber', 'subscriber', $filter ) );
+                $this-&gt;assertInstanceOf( 'IXR_Error', $result );
+                $this-&gt;assertEquals( 401, $result-&gt;code );
+        }
+
+        function test_capable_user() {
+                $this-&gt;make_user_by_role( 'editor' );
+
+                $result = $this-&gt;myxmlrpcserver-&gt;wp_getPosts( array( 1, 'editor', 'editor' ) );
+                $this-&gt;assertNotInstanceOf( 'IXR_Error', $result );
+        }
+
+        function test_invalid_post_type() {
+                $this-&gt;make_user_by_role( 'editor' );
+
+                $filter = array( 'post_type' =&gt; 'invalid_post_type_name' );
+                $result = $this-&gt;myxmlrpcserver-&gt;wp_getPosts( array( 1, 'editor', 'editor', $filter ) );
+                $this-&gt;assertInstanceOf( 'IXR_Error', $result );
+        }
+
+        function test_filters() {
+                $this-&gt;make_user_by_role( 'editor' );
+
+                $cpt_name = 'test_wp_getposts_cpt';
+                register_post_type( $cpt_name, array(
+                        'taxonomies' =&gt; array( 'post_tag', 'category' ),
+                        'public' =&gt; true
+                ));
+
+                $num_posts = 17;
+                $post_ids = $this-&gt;factory-&gt;post-&gt;create_many( $num_posts, array( 'post_type' =&gt; $cpt_name ) );
+
+                // get them all
+                $filter = array( 'post_type' =&gt; $cpt_name, 'number' =&gt; $num_posts + 10 );
+                $results = $this-&gt;myxmlrpcserver-&gt;wp_getPosts( array( 1, 'editor', 'editor', $filter ) );
+                $this-&gt;assertNotInstanceOf( 'IXR_Error', $results );
+                $this-&gt;assertEquals( $num_posts, count( $results ) );
+
+                // page through results
+                $posts_found = array();
+                $filter['number'] = 5;
+                $filter['offset'] = 0;
+                do {
+                        $presults = $this-&gt;myxmlrpcserver-&gt;wp_getPosts( array( 1, 'editor', 'editor', $filter ) );
+                        foreach( $presults as $post ) {
+                                $posts_found[] = $post['post_id'];
+                        }
+                        $filter['offset'] += $filter['number'];
+                } while ( count( $presults ) &gt; 0 );
+                // verify that $post_ids matches $posts_found
+                $this-&gt;assertEquals( 0, count( array_diff( $post_ids, $posts_found ) ) );
+
+                // add comments to some of the posts
+                $random_posts = array_rand( $post_ids, $num_posts / 2 );
+                foreach ( $random_posts as $i ) {
+                        $post = $post_ids[$i];
+                        $this-&gt;factory-&gt;comment-&gt;create_post_comments( $post, rand( 1, 20 ) );
+                }
+
+                // get results ordered by comment count
+                $filter2 = array( 'post_type' =&gt; $cpt_name, 'number' =&gt; $num_posts, 'orderby' =&gt; 'comment_count', 'order' =&gt; 'DESC' );
+                $results2 = $this-&gt;myxmlrpcserver-&gt;wp_getPosts( array( 1, 'editor', 'editor', $filter2 ) );
+                $this-&gt;assertNotInstanceOf( 'IXR_Error', $results2 );
+                $last_comment_count = 100;
+                foreach ( $results2 as $post ) {
+                        $comment_count = intval( get_comments_number( $post['post_id'] ) );
+                        $this-&gt;assertLessThanOrEqual( $last_comment_count, $comment_count );
+                        $last_comment_count = $comment_count;
+                }
+
+                // set one of the posts to draft and get drafts
+                $post = get_post( $post_ids[$random_posts[0]] );
+                $post-&gt;post_status = 'draft';
+                wp_update_post( $post );
+                $filter3 = array( 'post_type' =&gt; $cpt_name, 'post_status' =&gt; 'draft' );
+                $results3 = $this-&gt;myxmlrpcserver-&gt;wp_getPosts( array( 1, 'editor', 'editor', $filter3 ) );
+                $this-&gt;assertNotInstanceOf( 'IXR_Error', $results3 );
+                $this-&gt;assertEquals( 1, count( $results3 ) );
+                $this-&gt;assertEquals( $post-&gt;ID, $results3[0]['post_id'] );
+
+                _unregister_post_type( $cpt_name );
+        }
+
+        function test_fields() {
+                $this-&gt;make_user_by_role( 'editor' );
+                $this-&gt;factory-&gt;post-&gt;create();
+
+                // check default fields
+                $results = $this-&gt;myxmlrpcserver-&gt;wp_getPosts( array( 1, 'editor', 'editor' ) );
+                $this-&gt;assertNotInstanceOf( 'IXR_Error', $results );
+                $expected_fields = array( 'post_id', 'post_title', 'terms', 'custom_fields', 'link' ); // subset of expected fields
+                foreach( $expected_fields as $field ) {
+                        $this-&gt;assertArrayHasKey( $field, $results[0] );
+                }
+
+                // request specific fields and verify that only those are returned
+                $filter = array();
+                $fields = array( 'post_name', 'post_author', 'enclosure' );
+                $results2 = $this-&gt;myxmlrpcserver-&gt;wp_getPosts( array( 1, 'editor', 'editor', $filter, $fields ) );
+                $this-&gt;assertNotInstanceOf( 'IXR_Error', $results2 );
+                $expected_fields = array_merge( $fields, array( 'post_id' ) );
+                foreach ( array_keys( $results2[0] ) as $field ) {
+                        $this-&gt;assertContains( $field, $expected_fields );
+                }
+        }
</ins><span class="cx"> }
</span><span class="cx">\ No newline at end of file
</span><span class="cx">Property changes on: trunk/tests/test-xmlrpc-api/test_wp_getPosts.php
</span><span class="cx">___________________________________________________________________
</span></span></pre></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<a id="trunkteststestxmlrpcapitest_wp_getTaxonomiesphp"></a>
<div class="modfile"><h4>Modified: trunk/tests/test-xmlrpc-api/test_wp_getTaxonomies.php (882 => 883)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/tests/test-xmlrpc-api/test_wp_getTaxonomies.php        2012-07-08 11:10:15 UTC (rev 882)
+++ trunk/tests/test-xmlrpc-api/test_wp_getTaxonomies.php        2012-07-08 11:20:24 UTC (rev 883)
</span><span class="lines">@@ -1,20 +1,20 @@
</span><del>-&lt;?php
-
-/**
- * @group xmlrpc
- */
-class TestXMLRPCServer_wp_getTaxonomies extends WP_XMLRPC_UnitTestCase {
-
-        function test_invalid_username_password() {
-                $result = $this-&gt;myxmlrpcserver-&gt;wp_getTaxonomies( array( 1, 'username', 'password' ) );
-                $this-&gt;assertInstanceOf( 'IXR_Error', $result );
-                $this-&gt;assertEquals( 403, $result-&gt;code );
-        }
-
-        function test_taxonomy_validated() {
-                $this-&gt;make_user_by_role( 'editor' );
-
-                $result = $this-&gt;myxmlrpcserver-&gt;wp_getTaxonomies( array( 1, 'editor', 'editor' ) );
-                $this-&gt;assertNotInstanceOf( 'IXR_Error', $result );
-        }
</del><ins>+&lt;?php
+
+/**
+ * @group xmlrpc
+ */
+class TestXMLRPCServer_wp_getTaxonomies extends WP_XMLRPC_UnitTestCase {
+
+        function test_invalid_username_password() {
+                $result = $this-&gt;myxmlrpcserver-&gt;wp_getTaxonomies( array( 1, 'username', 'password' ) );
+                $this-&gt;assertInstanceOf( 'IXR_Error', $result );
+                $this-&gt;assertEquals( 403, $result-&gt;code );
+        }
+
+        function test_taxonomy_validated() {
+                $this-&gt;make_user_by_role( 'editor' );
+
+                $result = $this-&gt;myxmlrpcserver-&gt;wp_getTaxonomies( array( 1, 'editor', 'editor' ) );
+                $this-&gt;assertNotInstanceOf( 'IXR_Error', $result );
+        }
</ins><span class="cx"> }
</span><span class="cx">\ No newline at end of file
</span><span class="cx">Property changes on: trunk/tests/test-xmlrpc-api/test_wp_getTaxonomies.php
</span><span class="cx">___________________________________________________________________
</span></span></pre></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<a id="trunkteststestxmlrpcapitest_wp_getTaxonomyphp"></a>
<div class="modfile"><h4>Modified: trunk/tests/test-xmlrpc-api/test_wp_getTaxonomy.php (882 => 883)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/tests/test-xmlrpc-api/test_wp_getTaxonomy.php        2012-07-08 11:10:15 UTC (rev 882)
+++ trunk/tests/test-xmlrpc-api/test_wp_getTaxonomy.php        2012-07-08 11:20:24 UTC (rev 883)
</span><span class="lines">@@ -1,62 +1,62 @@
</span><del>-&lt;?php
-
-/**
- * @group xmlrpc
- */
-class TestXMLRPCServer_wp_getTaxonomy extends WP_XMLRPC_UnitTestCase {
-
-        function test_invalid_username_password() {
-                $result = $this-&gt;myxmlrpcserver-&gt;wp_getTaxonomy( array( 1, 'username', 'password', 'category' ) );
-                $this-&gt;assertInstanceOf( 'IXR_Error', $result );
-                $this-&gt;assertEquals( 403, $result-&gt;code );
-        }
-
-        function test_empty_taxonomy() {
-                $this-&gt;make_user_by_role( 'editor' );
-
-                $result = $this-&gt;myxmlrpcserver-&gt;wp_getTaxonomy( array( 1, 'editor', 'editor', '' ) );
-                $this-&gt;assertInstanceOf( 'IXR_Error', $result );
-                $this-&gt;assertEquals( 403, $result-&gt;code );
-                $this-&gt;assertEquals( __( 'Invalid taxonomy' ), $result-&gt;message );
-        }
-
-        function test_invalid_taxonomy() {
-                $this-&gt;make_user_by_role( 'editor' );
-
-                $result = $this-&gt;myxmlrpcserver-&gt;wp_getTaxonomy( array( 1, 'editor', 'editor', 'not_existing' ) );
-                $this-&gt;assertInstanceOf( 'IXR_Error', $result );
-                $this-&gt;assertEquals( 403, $result-&gt;code );
-                $this-&gt;assertEquals( __( 'Invalid taxonomy' ), $result-&gt;message );
-        }
-
-        function test_incapable_user() {
-                $this-&gt;make_user_by_role( 'subscriber' );
-
-                $result = $this-&gt;myxmlrpcserver-&gt;wp_getTaxonomy( array( 1, 'subscriber', 'subscriber', 'category' ) );
-                $this-&gt;assertInstanceOf( 'IXR_Error', $result );
-                $this-&gt;assertEquals( 401, $result-&gt;code );
-                $this-&gt;assertEquals( __( 'You are not allowed to assign terms in this taxonomy.' ), $result-&gt;message );
-        }
-
-        function test_taxonomy_validated() {
-                $this-&gt;make_user_by_role( 'editor' );
-
-                $result = $this-&gt;myxmlrpcserver-&gt;wp_getTaxonomy( array( 1, 'editor', 'editor', 'category' ) );
-                $this-&gt;assertNotInstanceOf( 'IXR_Error', $result );
-        }
-
-        function test_prepare_taxonomy() {
-                $this-&gt;make_user_by_role( 'editor' );
-
-                $result = $this-&gt;myxmlrpcserver-&gt;wp_getTaxonomy( array( 1, 'editor', 'editor', 'category' ) );
-                $taxonomy = get_taxonomy( 'category' );
-                $this-&gt;assertEquals( 'category', $result['name'], 'name' );
-                $this-&gt;assertEquals( true, $result['_builtin'], '_builtin' );
-                $this-&gt;assertEquals( $taxonomy-&gt;show_ui, $result['show_ui'], 'show_ui' );
-                $this-&gt;assertEquals( $taxonomy-&gt;public, $result['public'], 'public' );
-                $this-&gt;assertEquals( $taxonomy-&gt;hierarchical, $result['hierarchical'], 'hierarchical' );
-                $this-&gt;assertEquals( (array) $taxonomy-&gt;labels, $result['labels'], 'labels' );
-                $this-&gt;assertEquals( (array) $taxonomy-&gt;cap, $result['cap'], 'capabilities' );
-                $this-&gt;assertEquals( (array) $taxonomy-&gt;object_type, $result['object_type'], 'object_types' );
-        }
</del><ins>+&lt;?php
+
+/**
+ * @group xmlrpc
+ */
+class TestXMLRPCServer_wp_getTaxonomy extends WP_XMLRPC_UnitTestCase {
+
+        function test_invalid_username_password() {
+                $result = $this-&gt;myxmlrpcserver-&gt;wp_getTaxonomy( array( 1, 'username', 'password', 'category' ) );
+                $this-&gt;assertInstanceOf( 'IXR_Error', $result );
+                $this-&gt;assertEquals( 403, $result-&gt;code );
+        }
+
+        function test_empty_taxonomy() {
+                $this-&gt;make_user_by_role( 'editor' );
+
+                $result = $this-&gt;myxmlrpcserver-&gt;wp_getTaxonomy( array( 1, 'editor', 'editor', '' ) );
+                $this-&gt;assertInstanceOf( 'IXR_Error', $result );
+                $this-&gt;assertEquals( 403, $result-&gt;code );
+                $this-&gt;assertEquals( __( 'Invalid taxonomy' ), $result-&gt;message );
+        }
+
+        function test_invalid_taxonomy() {
+                $this-&gt;make_user_by_role( 'editor' );
+
+                $result = $this-&gt;myxmlrpcserver-&gt;wp_getTaxonomy( array( 1, 'editor', 'editor', 'not_existing' ) );
+                $this-&gt;assertInstanceOf( 'IXR_Error', $result );
+                $this-&gt;assertEquals( 403, $result-&gt;code );
+                $this-&gt;assertEquals( __( 'Invalid taxonomy' ), $result-&gt;message );
+        }
+
+        function test_incapable_user() {
+                $this-&gt;make_user_by_role( 'subscriber' );
+
+                $result = $this-&gt;myxmlrpcserver-&gt;wp_getTaxonomy( array( 1, 'subscriber', 'subscriber', 'category' ) );
+                $this-&gt;assertInstanceOf( 'IXR_Error', $result );
+                $this-&gt;assertEquals( 401, $result-&gt;code );
+                $this-&gt;assertEquals( __( 'You are not allowed to assign terms in this taxonomy.' ), $result-&gt;message );
+        }
+
+        function test_taxonomy_validated() {
+                $this-&gt;make_user_by_role( 'editor' );
+
+                $result = $this-&gt;myxmlrpcserver-&gt;wp_getTaxonomy( array( 1, 'editor', 'editor', 'category' ) );
+                $this-&gt;assertNotInstanceOf( 'IXR_Error', $result );
+        }
+
+        function test_prepare_taxonomy() {
+                $this-&gt;make_user_by_role( 'editor' );
+
+                $result = $this-&gt;myxmlrpcserver-&gt;wp_getTaxonomy( array( 1, 'editor', 'editor', 'category' ) );
+                $taxonomy = get_taxonomy( 'category' );
+                $this-&gt;assertEquals( 'category', $result['name'], 'name' );
+                $this-&gt;assertEquals( true, $result['_builtin'], '_builtin' );
+                $this-&gt;assertEquals( $taxonomy-&gt;show_ui, $result['show_ui'], 'show_ui' );
+                $this-&gt;assertEquals( $taxonomy-&gt;public, $result['public'], 'public' );
+                $this-&gt;assertEquals( $taxonomy-&gt;hierarchical, $result['hierarchical'], 'hierarchical' );
+                $this-&gt;assertEquals( (array) $taxonomy-&gt;labels, $result['labels'], 'labels' );
+                $this-&gt;assertEquals( (array) $taxonomy-&gt;cap, $result['cap'], 'capabilities' );
+                $this-&gt;assertEquals( (array) $taxonomy-&gt;object_type, $result['object_type'], 'object_types' );
+        }
</ins><span class="cx"> }
</span><span class="cx">\ No newline at end of file
</span><span class="cx">Property changes on: trunk/tests/test-xmlrpc-api/test_wp_getTaxonomy.php
</span><span class="cx">___________________________________________________________________
</span></span></pre></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<a id="trunkteststestxmlrpcapitest_wp_getTermphp"></a>
<div class="modfile"><h4>Modified: trunk/tests/test-xmlrpc-api/test_wp_getTerm.php (882 => 883)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/tests/test-xmlrpc-api/test_wp_getTerm.php        2012-07-08 11:10:15 UTC (rev 882)
+++ trunk/tests/test-xmlrpc-api/test_wp_getTerm.php        2012-07-08 11:20:24 UTC (rev 883)
</span><span class="lines">@@ -1,97 +1,97 @@
</span><del>-&lt;?php
-
-/**
- * @group xmlrpc
- */
-class TestXMLRPCServer_wp_getTerm extends WP_XMLRPC_UnitTestCase {
-        var $term;
-
-        function setUp() {
-                parent::setUp();
-
-                $this-&gt;term = wp_insert_term( 'term' . rand_str() , 'category' );
-        }
-
-        function test_invalid_username_password() {
-                $result = $this-&gt;myxmlrpcserver-&gt;wp_getTerm( array( 1, 'username', 'password', 'category', 1 ) );
-                $this-&gt;assertInstanceOf( 'IXR_Error', $result );
-                $this-&gt;assertEquals( 403, $result-&gt;code );
-        }
-
-        function test_empty_taxonomy() {
-                $this-&gt;make_user_by_role( 'editor' );
-
-                $result = $this-&gt;myxmlrpcserver-&gt;wp_getTerm( array( 1, 'editor', 'editor', '', 0 ) );
-                $this-&gt;assertInstanceOf( 'IXR_Error', $result );
-                $this-&gt;assertEquals( 403, $result-&gt;code );
-                $this-&gt;assertEquals( __( 'Invalid taxonomy' ), $result-&gt;message );
-        }
-
-        function test_invalid_taxonomy() {
-                $this-&gt;make_user_by_role( 'editor' );
-
-                $result = $this-&gt;myxmlrpcserver-&gt;wp_getTerm( array( 1, 'editor', 'editor', 'not_existing', 0 ) );
-                $this-&gt;assertInstanceOf( 'IXR_Error', $result );
-                $this-&gt;assertEquals( 403, $result-&gt;code );
-                $this-&gt;assertEquals( __( 'Invalid taxonomy' ), $result-&gt;message );
-        }
-
-        function test_incapable_user() {
-                $this-&gt;make_user_by_role( 'subscriber' );
-
-                $result = $this-&gt;myxmlrpcserver-&gt;wp_getTerm( array( 1, 'subscriber', 'subscriber', 'category', $this-&gt;term['term_id'] ) );
-                $this-&gt;assertInstanceOf( 'IXR_Error', $result );
-                $this-&gt;assertEquals( 401, $result-&gt;code );
-                $this-&gt;assertEquals( __( 'You are not allowed to assign terms in this taxonomy.' ), $result-&gt;message );
-        }
-
-
-        function test_empty_term() {
-                $this-&gt;make_user_by_role( 'editor' );
-
-                $result = $this-&gt;myxmlrpcserver-&gt;wp_getTerm( array( 1, 'editor', 'editor', 'category', '' ) );
-                $this-&gt;assertInstanceOf( 'IXR_Error', $result );
-                $this-&gt;assertEquals( 500, $result-&gt;code );
-                $this-&gt;assertEquals( __('Empty Term'), $result-&gt;message );
-        }
-
-        function test_invalid_term() {
-                $this-&gt;make_user_by_role( 'editor' );
-
-                $result = $this-&gt;myxmlrpcserver-&gt;wp_getTerm( array( 1, 'editor', 'editor', 'category', 9999 ) );
-                $this-&gt;assertInstanceOf( 'IXR_Error', $result );
-                $this-&gt;assertEquals( 404, $result-&gt;code );
-                $this-&gt;assertEquals( __('Invalid term ID'), $result-&gt;message );
-        }
-
-        function test_valid_term() {
-                $this-&gt;make_user_by_role( 'editor' );
-
-                $term = get_term( $this-&gt;term['term_id'], 'category', ARRAY_A );
-
-                $result = $this-&gt;myxmlrpcserver-&gt;wp_getTerm( array( 1, 'editor', 'editor', 'category', $this-&gt;term['term_id'] ) );
-
-                $this-&gt;assertNotInstanceOf( 'IXR_Error', $result );
-                $this-&gt;assertEquals( $result, $term );
-
-                // Check DataTypes
-                $this-&gt;assertInternalType( 'string', $result['name'] );
-                $this-&gt;assertInternalType( 'string', $result['slug'] );
-                $this-&gt;assertInternalType( 'string', $result['taxonomy'] );
-                $this-&gt;assertInternalType( 'string', $result['description'] );
-                $this-&gt;assertInternalType( 'int', $result['count'] );
-
-                // We expect all ID's to be strings not integers so we don't return something larger than an XMLRPC integer can describe.
-                $this-&gt;assertStringMatchesFormat( '%d', $result['term_id'] );
-                $this-&gt;assertStringMatchesFormat( '%d', $result['term_group'] );
-                $this-&gt;assertStringMatchesFormat( '%d', $result['term_taxonomy_id'] );
-                $this-&gt;assertStringMatchesFormat( '%d', $result['parent'] );
-
-                // Check Data
-                $this-&gt;assertEquals( 0, $result['count'] );
-                $this-&gt;assertEquals( $term['name'], $result['name'] );
-                $this-&gt;assertEquals( $term['slug'], $result['slug'] );
-                $this-&gt;assertEquals( 'category', $result['taxonomy'] );
-                $this-&gt;assertEquals( $term['description'], $result['description'] );
-        }
-}
</del><ins>+&lt;?php
+
+/**
+ * @group xmlrpc
+ */
+class TestXMLRPCServer_wp_getTerm extends WP_XMLRPC_UnitTestCase {
+        var $term;
+
+        function setUp() {
+                parent::setUp();
+
+                $this-&gt;term = wp_insert_term( 'term' . rand_str() , 'category' );
+        }
+
+        function test_invalid_username_password() {
+                $result = $this-&gt;myxmlrpcserver-&gt;wp_getTerm( array( 1, 'username', 'password', 'category', 1 ) );
+                $this-&gt;assertInstanceOf( 'IXR_Error', $result );
+                $this-&gt;assertEquals( 403, $result-&gt;code );
+        }
+
+        function test_empty_taxonomy() {
+                $this-&gt;make_user_by_role( 'editor' );
+
+                $result = $this-&gt;myxmlrpcserver-&gt;wp_getTerm( array( 1, 'editor', 'editor', '', 0 ) );
+                $this-&gt;assertInstanceOf( 'IXR_Error', $result );
+                $this-&gt;assertEquals( 403, $result-&gt;code );
+                $this-&gt;assertEquals( __( 'Invalid taxonomy' ), $result-&gt;message );
+        }
+
+        function test_invalid_taxonomy() {
+                $this-&gt;make_user_by_role( 'editor' );
+
+                $result = $this-&gt;myxmlrpcserver-&gt;wp_getTerm( array( 1, 'editor', 'editor', 'not_existing', 0 ) );
+                $this-&gt;assertInstanceOf( 'IXR_Error', $result );
+                $this-&gt;assertEquals( 403, $result-&gt;code );
+                $this-&gt;assertEquals( __( 'Invalid taxonomy' ), $result-&gt;message );
+        }
+
+        function test_incapable_user() {
+                $this-&gt;make_user_by_role( 'subscriber' );
+
+                $result = $this-&gt;myxmlrpcserver-&gt;wp_getTerm( array( 1, 'subscriber', 'subscriber', 'category', $this-&gt;term['term_id'] ) );
+                $this-&gt;assertInstanceOf( 'IXR_Error', $result );
+                $this-&gt;assertEquals( 401, $result-&gt;code );
+                $this-&gt;assertEquals( __( 'You are not allowed to assign terms in this taxonomy.' ), $result-&gt;message );
+        }
+
+
+        function test_empty_term() {
+                $this-&gt;make_user_by_role( 'editor' );
+
+                $result = $this-&gt;myxmlrpcserver-&gt;wp_getTerm( array( 1, 'editor', 'editor', 'category', '' ) );
+                $this-&gt;assertInstanceOf( 'IXR_Error', $result );
+                $this-&gt;assertEquals( 500, $result-&gt;code );
+                $this-&gt;assertEquals( __('Empty Term'), $result-&gt;message );
+        }
+
+        function test_invalid_term() {
+                $this-&gt;make_user_by_role( 'editor' );
+
+                $result = $this-&gt;myxmlrpcserver-&gt;wp_getTerm( array( 1, 'editor', 'editor', 'category', 9999 ) );
+                $this-&gt;assertInstanceOf( 'IXR_Error', $result );
+                $this-&gt;assertEquals( 404, $result-&gt;code );
+                $this-&gt;assertEquals( __('Invalid term ID'), $result-&gt;message );
+        }
+
+        function test_valid_term() {
+                $this-&gt;make_user_by_role( 'editor' );
+
+                $term = get_term( $this-&gt;term['term_id'], 'category', ARRAY_A );
+
+                $result = $this-&gt;myxmlrpcserver-&gt;wp_getTerm( array( 1, 'editor', 'editor', 'category', $this-&gt;term['term_id'] ) );
+
+                $this-&gt;assertNotInstanceOf( 'IXR_Error', $result );
+                $this-&gt;assertEquals( $result, $term );
+
+                // Check DataTypes
+                $this-&gt;assertInternalType( 'string', $result['name'] );
+                $this-&gt;assertInternalType( 'string', $result['slug'] );
+                $this-&gt;assertInternalType( 'string', $result['taxonomy'] );
+                $this-&gt;assertInternalType( 'string', $result['description'] );
+                $this-&gt;assertInternalType( 'int', $result['count'] );
+
+                // We expect all ID's to be strings not integers so we don't return something larger than an XMLRPC integer can describe.
+                $this-&gt;assertStringMatchesFormat( '%d', $result['term_id'] );
+                $this-&gt;assertStringMatchesFormat( '%d', $result['term_group'] );
+                $this-&gt;assertStringMatchesFormat( '%d', $result['term_taxonomy_id'] );
+                $this-&gt;assertStringMatchesFormat( '%d', $result['parent'] );
+
+                // Check Data
+                $this-&gt;assertEquals( 0, $result['count'] );
+                $this-&gt;assertEquals( $term['name'], $result['name'] );
+                $this-&gt;assertEquals( $term['slug'], $result['slug'] );
+                $this-&gt;assertEquals( 'category', $result['taxonomy'] );
+                $this-&gt;assertEquals( $term['description'], $result['description'] );
+        }
+}
</ins><span class="cx">Property changes on: trunk/tests/test-xmlrpc-api/test_wp_getTerm.php
</span><span class="cx">___________________________________________________________________
</span></span></pre></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<a id="trunkteststestxmlrpcapitest_wp_getTermsphp"></a>
<div class="modfile"><h4>Modified: trunk/tests/test-xmlrpc-api/test_wp_getTerms.php (882 => 883)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/tests/test-xmlrpc-api/test_wp_getTerms.php        2012-07-08 11:10:15 UTC (rev 882)
+++ trunk/tests/test-xmlrpc-api/test_wp_getTerms.php        2012-07-08 11:20:24 UTC (rev 883)
</span><span class="lines">@@ -1,149 +1,149 @@
</span><del>-&lt;?php
-
-/**
- * @group xmlrpc
- */
-class TestXMLRPCServer_wp_getTerms extends WP_XMLRPC_UnitTestCase {
-
-        function test_invalid_username_password() {
-                $result = $this-&gt;myxmlrpcserver-&gt;wp_getTerms( array( 1, 'username', 'password', 'category' ) );
-                $this-&gt;assertInstanceOf( 'IXR_Error', $result );
-                $this-&gt;assertEquals( 403, $result-&gt;code );
-        }
-
-        function test_empty_taxonomy() {
-                $this-&gt;make_user_by_role( 'editor' );
-
-                $result = $this-&gt;myxmlrpcserver-&gt;wp_getTerms( array( 1, 'editor', 'editor', '' ) );
-                $this-&gt;assertInstanceOf( 'IXR_Error', $result );
-                $this-&gt;assertEquals( 403, $result-&gt;code );
-                $this-&gt;assertEquals( __( 'Invalid taxonomy' ), $result-&gt;message );
-        }
-
-        function test_invalid_taxonomy() {
-                $this-&gt;make_user_by_role( 'editor' );
-
-                $result = $this-&gt;myxmlrpcserver-&gt;wp_getTerms( array( 1, 'editor', 'editor', 'not_existing' ) );
-                $this-&gt;assertInstanceOf( 'IXR_Error', $result );
-                $this-&gt;assertEquals( 403, $result-&gt;code );
-                $this-&gt;assertEquals( __( 'Invalid taxonomy' ), $result-&gt;message );
-        }
-
-        function test_incapable_user() {
-                $this-&gt;make_user_by_role( 'subscriber' );
-
-                $result = $this-&gt;myxmlrpcserver-&gt;wp_getTerms( array( 1, 'subscriber', 'subscriber', 'category' ) );
-                $this-&gt;assertInstanceOf( 'IXR_Error', $result );
-                $this-&gt;assertEquals( 401, $result-&gt;code );
-                $this-&gt;assertEquals( __( 'You are not allowed to assign terms in this taxonomy.' ), $result-&gt;message );
-        }
-
-        function test_valid_terms() {
-                $this-&gt;make_user_by_role( 'editor' );
-
-                // make sure there's at least one category
-                $cat = wp_insert_term( 'term' . rand_str() , 'category' );
-
-                $results = $this-&gt;myxmlrpcserver-&gt;wp_getTerms( array( 1, 'editor', 'editor', 'category' ) );
-                $this-&gt;assertNotInstanceOf( 'IXR_Error', $results );
-
-                foreach( $results as $term ) {
-                        $this-&gt;assertInternalType( 'int', $term['count'] );
-
-                        // We expect all other IDs to be strings not integers so we don't return something larger than an XMLRPC integer can describe.
-                        $this-&gt;assertStringMatchesFormat( '%d', $term['term_id'] );
-                        $this-&gt;assertStringMatchesFormat( '%d', $term['term_group'] );
-                        $this-&gt;assertStringMatchesFormat( '%d', $term['term_taxonomy_id'] );
-                        $this-&gt;assertStringMatchesFormat( '%d', $term['parent'] );
-                }
-        }
-
-        function test_custom_taxonomy() {
-                $this-&gt;make_user_by_role( 'editor' );
-
-                // create a taxonomy and some terms for it
-                $tax_name = 'wp_getTerms_custom_taxonomy';
-                $num_terms = 12;
-                register_taxonomy( $tax_name, 'post' );
-                for( $i = 0; $i &lt; $num_terms; $i++ )
-                        wp_insert_term( rand_str( 10 ), $tax_name );
-
-
-                // test fetching all terms
-                $results = $this-&gt;myxmlrpcserver-&gt;wp_getTerms( array( 1, 'editor', 'editor', $tax_name ) );
-                $this-&gt;assertNotInstanceOf( 'IXR_Error', $results );
-
-                $this-&gt;assertEquals( $num_terms, count( $results ) );
-                foreach ( $results as $term ) {
-                        $this-&gt;assertEquals( $tax_name, $term['taxonomy'] );
-                }
-
-                // test paged results
-                $filter = array( 'number' =&gt; 5 );
-                $results2 = $this-&gt;myxmlrpcserver-&gt;wp_getTerms( array( 1, 'editor', 'editor', $tax_name, $filter ) );
-                $this-&gt;assertNotInstanceOf( 'IXR_Error', $results );
-                $this-&gt;assertEquals( 5, count( $results2 ) );
-                $this-&gt;assertEquals( $results[1]['term_id'], $results2[1]['term_id'] ); // check one of the terms
-
-                $filter['offset'] = 10;
-                $results3 = $this-&gt;myxmlrpcserver-&gt;wp_getTerms( array( 1, 'editor', 'editor', $tax_name, $filter ) );
-                $this-&gt;assertNotInstanceOf( 'IXR_Error', $results3 );
-                $this-&gt;assertEquals( $num_terms - 10, count( $results3 ) );
-                $this-&gt;assertEquals( $results[11]['term_id'], $results3[1]['term_id'] );
-
-                // test hide_empty (since none have been attached to posts yet, all should be hidden
-                $filter = array( 'hide_empty' =&gt; true );
-                $results4 = $this-&gt;myxmlrpcserver-&gt;wp_getTerms( array( 1, 'editor', 'editor', $tax_name, $filter ) );
-                $this-&gt;assertNotInstanceOf( 'IXR_Error', $results4 );
-                $this-&gt;assertEquals( 0, count( $results4 ) );
-
-                unset($GLOBALS['wp_taxonomies'][$tax_name]);
-        }
-
-        function test_term_ordering() {
-                $this-&gt;make_user_by_role( 'editor' );
-
-                $cat1 = wp_create_category( 'wp.getTerms_' . rand_str( 16 ) );
-                $cat2 = wp_create_category( 'wp.getTerms_' . rand_str( 16 ) );
-
-                $this-&gt;factory-&gt;post-&gt;create_many( 5, array( 'post_category' =&gt; array( $cat1 ) ) );
-                $this-&gt;factory-&gt;post-&gt;create_many( 3, array( 'post_category' =&gt; array( $cat2 ) ) );
-
-                $filter = array( 'orderby' =&gt; 'count', 'order' =&gt; 'DESC' );
-                $results = $this-&gt;myxmlrpcserver-&gt;wp_getTerms( array( 1, 'editor', 'editor', 'category', $filter ) );
-                $this-&gt;assertNotInstanceOf( 'IXR_Error', $results );
-                $this-&gt;assertNotEquals( 0, count( $results ) );
-
-                foreach( $results as $term ) {
-                        if ( $term['term_id'] == $cat1 ) {
-                                break;  // found cat1 first as expected
-                        }
-                        else if ( $term['term_id'] == $cat2 ) {
-                                $this-&gt;assertFalse( false, 'Incorrect category ordering.' );
-                        }
-                }
-        }
-
-        function test_terms_search() {
-                $this-&gt;make_user_by_role( 'editor' );
-
-                $name = rand_str( 30 );
-                $name_id = wp_create_category( $name );
-
-                // search by full name
-                $filter = array( 'search' =&gt; $name );
-                $results = $this-&gt;myxmlrpcserver-&gt;wp_getTerms( array( 1, 'editor', 'editor', 'category', $filter ) );
-                $this-&gt;assertNotInstanceOf( 'IXR_Error', $results );
-                $this-&gt;assertEquals( 1, count( $results ) );
-                $this-&gt;assertEquals( $name, $results[0]['name'] );
-                $this-&gt;assertEquals( $name_id, $results[0]['term_id'] );
-
-                // search by partial name
-                $filter = array( 'search' =&gt; substr( $name, 0, 10 ) );
-                $results2 = $this-&gt;myxmlrpcserver-&gt;wp_getTerms( array( 1, 'editor', 'editor', 'category', $filter ) );
-                $this-&gt;assertNotInstanceOf( 'IXR_Error', $results2 );
-                $this-&gt;assertEquals( 1, count( $results2 ) );
-                $this-&gt;assertEquals( $name, $results2[0]['name'] );
-                $this-&gt;assertEquals( $name_id, $results2[0]['term_id'] );
-        }
-}
</del><ins>+&lt;?php
+
+/**
+ * @group xmlrpc
+ */
+class TestXMLRPCServer_wp_getTerms extends WP_XMLRPC_UnitTestCase {
+
+        function test_invalid_username_password() {
+                $result = $this-&gt;myxmlrpcserver-&gt;wp_getTerms( array( 1, 'username', 'password', 'category' ) );
+                $this-&gt;assertInstanceOf( 'IXR_Error', $result );
+                $this-&gt;assertEquals( 403, $result-&gt;code );
+        }
+
+        function test_empty_taxonomy() {
+                $this-&gt;make_user_by_role( 'editor' );
+
+                $result = $this-&gt;myxmlrpcserver-&gt;wp_getTerms( array( 1, 'editor', 'editor', '' ) );
+                $this-&gt;assertInstanceOf( 'IXR_Error', $result );
+                $this-&gt;assertEquals( 403, $result-&gt;code );
+                $this-&gt;assertEquals( __( 'Invalid taxonomy' ), $result-&gt;message );
+        }
+
+        function test_invalid_taxonomy() {
+                $this-&gt;make_user_by_role( 'editor' );
+
+                $result = $this-&gt;myxmlrpcserver-&gt;wp_getTerms( array( 1, 'editor', 'editor', 'not_existing' ) );
+                $this-&gt;assertInstanceOf( 'IXR_Error', $result );
+                $this-&gt;assertEquals( 403, $result-&gt;code );
+                $this-&gt;assertEquals( __( 'Invalid taxonomy' ), $result-&gt;message );
+        }
+
+        function test_incapable_user() {
+                $this-&gt;make_user_by_role( 'subscriber' );
+
+                $result = $this-&gt;myxmlrpcserver-&gt;wp_getTerms( array( 1, 'subscriber', 'subscriber', 'category' ) );
+                $this-&gt;assertInstanceOf( 'IXR_Error', $result );
+                $this-&gt;assertEquals( 401, $result-&gt;code );
+                $this-&gt;assertEquals( __( 'You are not allowed to assign terms in this taxonomy.' ), $result-&gt;message );
+        }
+
+        function test_valid_terms() {
+                $this-&gt;make_user_by_role( 'editor' );
+
+                // make sure there's at least one category
+                $cat = wp_insert_term( 'term' . rand_str() , 'category' );
+
+                $results = $this-&gt;myxmlrpcserver-&gt;wp_getTerms( array( 1, 'editor', 'editor', 'category' ) );
+                $this-&gt;assertNotInstanceOf( 'IXR_Error', $results );
+
+                foreach( $results as $term ) {
+                        $this-&gt;assertInternalType( 'int', $term['count'] );
+
+                        // We expect all other IDs to be strings not integers so we don't return something larger than an XMLRPC integer can describe.
+                        $this-&gt;assertStringMatchesFormat( '%d', $term['term_id'] );
+                        $this-&gt;assertStringMatchesFormat( '%d', $term['term_group'] );
+                        $this-&gt;assertStringMatchesFormat( '%d', $term['term_taxonomy_id'] );
+                        $this-&gt;assertStringMatchesFormat( '%d', $term['parent'] );
+                }
+        }
+
+        function test_custom_taxonomy() {
+                $this-&gt;make_user_by_role( 'editor' );
+
+                // create a taxonomy and some terms for it
+                $tax_name = 'wp_getTerms_custom_taxonomy';
+                $num_terms = 12;
+                register_taxonomy( $tax_name, 'post' );
+                for( $i = 0; $i &lt; $num_terms; $i++ )
+                        wp_insert_term( rand_str( 10 ), $tax_name );
+
+
+                // test fetching all terms
+                $results = $this-&gt;myxmlrpcserver-&gt;wp_getTerms( array( 1, 'editor', 'editor', $tax_name ) );
+                $this-&gt;assertNotInstanceOf( 'IXR_Error', $results );
+
+                $this-&gt;assertEquals( $num_terms, count( $results ) );
+                foreach ( $results as $term ) {
+                        $this-&gt;assertEquals( $tax_name, $term['taxonomy'] );
+                }
+
+                // test paged results
+                $filter = array( 'number' =&gt; 5 );
+                $results2 = $this-&gt;myxmlrpcserver-&gt;wp_getTerms( array( 1, 'editor', 'editor', $tax_name, $filter ) );
+                $this-&gt;assertNotInstanceOf( 'IXR_Error', $results );
+                $this-&gt;assertEquals( 5, count( $results2 ) );
+                $this-&gt;assertEquals( $results[1]['term_id'], $results2[1]['term_id'] ); // check one of the terms
+
+                $filter['offset'] = 10;
+                $results3 = $this-&gt;myxmlrpcserver-&gt;wp_getTerms( array( 1, 'editor', 'editor', $tax_name, $filter ) );
+                $this-&gt;assertNotInstanceOf( 'IXR_Error', $results3 );
+                $this-&gt;assertEquals( $num_terms - 10, count( $results3 ) );
+                $this-&gt;assertEquals( $results[11]['term_id'], $results3[1]['term_id'] );
+
+                // test hide_empty (since none have been attached to posts yet, all should be hidden
+                $filter = array( 'hide_empty' =&gt; true );
+                $results4 = $this-&gt;myxmlrpcserver-&gt;wp_getTerms( array( 1, 'editor', 'editor', $tax_name, $filter ) );
+                $this-&gt;assertNotInstanceOf( 'IXR_Error', $results4 );
+                $this-&gt;assertEquals( 0, count( $results4 ) );
+
+                unset($GLOBALS['wp_taxonomies'][$tax_name]);
+        }
+
+        function test_term_ordering() {
+                $this-&gt;make_user_by_role( 'editor' );
+
+                $cat1 = wp_create_category( 'wp.getTerms_' . rand_str( 16 ) );
+                $cat2 = wp_create_category( 'wp.getTerms_' . rand_str( 16 ) );
+
+                $this-&gt;factory-&gt;post-&gt;create_many( 5, array( 'post_category' =&gt; array( $cat1 ) ) );
+                $this-&gt;factory-&gt;post-&gt;create_many( 3, array( 'post_category' =&gt; array( $cat2 ) ) );
+
+                $filter = array( 'orderby' =&gt; 'count', 'order' =&gt; 'DESC' );
+                $results = $this-&gt;myxmlrpcserver-&gt;wp_getTerms( array( 1, 'editor', 'editor', 'category', $filter ) );
+                $this-&gt;assertNotInstanceOf( 'IXR_Error', $results );
+                $this-&gt;assertNotEquals( 0, count( $results ) );
+
+                foreach( $results as $term ) {
+                        if ( $term['term_id'] == $cat1 ) {
+                                break;  // found cat1 first as expected
+                        }
+                        else if ( $term['term_id'] == $cat2 ) {
+                                $this-&gt;assertFalse( false, 'Incorrect category ordering.' );
+                        }
+                }
+        }
+
+        function test_terms_search() {
+                $this-&gt;make_user_by_role( 'editor' );
+
+                $name = rand_str( 30 );
+                $name_id = wp_create_category( $name );
+
+                // search by full name
+                $filter = array( 'search' =&gt; $name );
+                $results = $this-&gt;myxmlrpcserver-&gt;wp_getTerms( array( 1, 'editor', 'editor', 'category', $filter ) );
+                $this-&gt;assertNotInstanceOf( 'IXR_Error', $results );
+                $this-&gt;assertEquals( 1, count( $results ) );
+                $this-&gt;assertEquals( $name, $results[0]['name'] );
+                $this-&gt;assertEquals( $name_id, $results[0]['term_id'] );
+
+                // search by partial name
+                $filter = array( 'search' =&gt; substr( $name, 0, 10 ) );
+                $results2 = $this-&gt;myxmlrpcserver-&gt;wp_getTerms( array( 1, 'editor', 'editor', 'category', $filter ) );
+                $this-&gt;assertNotInstanceOf( 'IXR_Error', $results2 );
+                $this-&gt;assertEquals( 1, count( $results2 ) );
+                $this-&gt;assertEquals( $name, $results2[0]['name'] );
+                $this-&gt;assertEquals( $name_id, $results2[0]['term_id'] );
+        }
+}
</ins><span class="cx">Property changes on: trunk/tests/test-xmlrpc-api/test_wp_getTerms.php
</span><span class="cx">___________________________________________________________________
</span></span></pre></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<a id="trunkteststestxmlrpcapitest_wp_uploadFilephp"></a>
<div class="modfile"><h4>Modified: trunk/tests/test-xmlrpc-api/test_wp_uploadFile.php (882 => 883)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/tests/test-xmlrpc-api/test_wp_uploadFile.php        2012-07-08 11:10:15 UTC (rev 882)
+++ trunk/tests/test-xmlrpc-api/test_wp_uploadFile.php        2012-07-08 11:20:24 UTC (rev 883)
</span><span class="lines">@@ -1,30 +1,30 @@
</span><del>-&lt;?php
-
-/**
- * @group xmlrpc
- */
-class TestXMLRPCServer_wp_uploadFile extends WP_XMLRPC_UnitTestCase {
-        function test_valid_attachment() {
-                $this-&gt;make_user_by_role( 'editor' );
-
-                // create attachment
-                $filename = ( DIR_TESTDATA.'/images/a2-small.jpg' );
-                $contents = file_get_contents( $filename );
-                $data = array(
-                        'name' =&gt; 'a2-small.jpg',
-                        'type' =&gt; 'image/jpeg',
-                        'bits' =&gt; base64_encode( $contents )
-                );
-
-
-                $result = $this-&gt;myxmlrpcserver-&gt;mw_newMediaObject( array( 0, 'editor', 'editor', $data ) );
-                $this-&gt;assertNotInstanceOf( 'IXR_Error', $result );
-
-                // check data types
-                $this-&gt;assertInternalType( 'string', $result['id'] );
-                $this-&gt;assertStringMatchesFormat( '%d', $result['id'] );
-                $this-&gt;assertInternalType( 'string', $result['file'] );
-                $this-&gt;assertInternalType( 'string', $result['url'] );
-                $this-&gt;assertInternalType( 'string', $result['type'] );
-        }
</del><ins>+&lt;?php
+
+/**
+ * @group xmlrpc
+ */
+class TestXMLRPCServer_wp_uploadFile extends WP_XMLRPC_UnitTestCase {
+        function test_valid_attachment() {
+                $this-&gt;make_user_by_role( 'editor' );
+
+                // create attachment
+                $filename = ( DIR_TESTDATA.'/images/a2-small.jpg' );
+                $contents = file_get_contents( $filename );
+                $data = array(
+                        'name' =&gt; 'a2-small.jpg',
+                        'type' =&gt; 'image/jpeg',
+                        'bits' =&gt; base64_encode( $contents )
+                );
+
+
+                $result = $this-&gt;myxmlrpcserver-&gt;mw_newMediaObject( array( 0, 'editor', 'editor', $data ) );
+                $this-&gt;assertNotInstanceOf( 'IXR_Error', $result );
+
+                // check data types
+                $this-&gt;assertInternalType( 'string', $result['id'] );
+                $this-&gt;assertStringMatchesFormat( '%d', $result['id'] );
+                $this-&gt;assertInternalType( 'string', $result['file'] );
+                $this-&gt;assertInternalType( 'string', $result['url'] );
+                $this-&gt;assertInternalType( 'string', $result['type'] );
+        }
</ins><span class="cx"> }
</span><span class="cx">\ No newline at end of file
</span><span class="cx">Property changes on: trunk/tests/test-xmlrpc-api/test_wp_uploadFile.php
</span><span class="cx">___________________________________________________________________
</span></span></pre></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<a id="trunkteststest_actions_closuresphp"></a>
<div class="propset"><h4>Property changes: trunk/tests/test_actions_closures.php</h4>
<pre class="diff"><span>
</span></pre></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<a id="trunkteststest_includes_balance_tagsphp"></a>
<div class="propset"><h4>Property changes: trunk/tests/test_includes_balance_tags.php</h4>
<pre class="diff"><span>
</span></pre></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<a id="trunkteststest_includes_classwpthemephp"></a>
<div class="propset"><h4>Property changes: trunk/tests/test_includes_class-wp-theme.php</h4>
<pre class="diff"><span>
</span></pre></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<a id="trunkteststest_includes_mediaphp"></a>
<div class="propset"><h4>Property changes: trunk/tests/test_includes_media.php</h4>
<pre class="diff"><span>
</span></pre></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<a id="trunkwptestsconfigsamplephp"></a>
<div class="modfile"><h4>Modified: trunk/wp-tests-config-sample.php (882 => 883)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-tests-config-sample.php        2012-07-08 11:10:15 UTC (rev 882)
+++ trunk/wp-tests-config-sample.php        2012-07-08 11:20:24 UTC (rev 883)
</span><span class="lines">@@ -1,46 +1,46 @@
</span><del>-&lt;?php
-
-/* Path to the WordPress codebase you'd like to test. Add a backslash in the end. */
-define( 'ABSPATH', dirname( __FILE__ ) . '/wordpress/' );
-
-// Test with multisite enabled: (previously -m)
-// define( 'WP_TESTS_MULTISITE', true );
-
-// Force known bugs: (previously -f)
-// define( 'WP_TESTS_FORCE_KNOWN_BUGS', true );
-
-// Test with WordPress debug mode on (previously -d)
-// define( 'WP_DEBUG', true );
-
-// ** MySQL settings ** //
-
-// This configuration file will be used by the copy of WordPress being tested.
-// wordpress/wp-config.php will be ignored.
-
-// WARNING WARNING WARNING!
-// wp-test will DROP ALL TABLES in the database named below.
-// DO NOT use a production database or one that is shared with something else.
-
-define( 'DB_NAME', 'putyourdbnamehere' );    // The name of the database
-define( 'DB_USER', 'usernamehere' );     // Your MySQL username
-define( 'DB_PASSWORD', 'yourpasswordhere' ); // ...and password
-define( 'DB_HOST', 'localhost' );    // 99% chance you won't need to change this value
-define( 'DB_CHARSET', 'utf8' );
-define( 'DB_COLLATE', '' );
-
-// You can have multiple installations in one database if you give each a unique prefix
-$table_prefix  = 'wp_';   // Only numbers, letters, and underscores please!
-
-// Change this to localize WordPress.  A corresponding MO file for the
-// chosen language must be installed to wp-content/languages.
-// For example, install de.mo to wp-content/languages and set WPLANG to 'de'
-// to enable German language support.
-define ( 'WPLANG', '' );
-
-define( 'WP_TESTS_DOMAIN', 'example.org' );
-define( 'WP_TESTS_EMAIL', 'admin@example.org' );
-define( 'WP_TESTS_TITLE', 'Test Blog' );
-
-$table_prefix  = 'wp_';
-
-define( 'WP_PHP_BINARY', 'php' );
</del><ins>+&lt;?php
+
+/* Path to the WordPress codebase you'd like to test. Add a backslash in the end. */
+define( 'ABSPATH', dirname( __FILE__ ) . '/wordpress/' );
+
+// Test with multisite enabled: (previously -m)
+// define( 'WP_TESTS_MULTISITE', true );
+
+// Force known bugs: (previously -f)
+// define( 'WP_TESTS_FORCE_KNOWN_BUGS', true );
+
+// Test with WordPress debug mode on (previously -d)
+// define( 'WP_DEBUG', true );
+
+// ** MySQL settings ** //
+
+// This configuration file will be used by the copy of WordPress being tested.
+// wordpress/wp-config.php will be ignored.
+
+// WARNING WARNING WARNING!
+// wp-test will DROP ALL TABLES in the database named below.
+// DO NOT use a production database or one that is shared with something else.
+
+define( 'DB_NAME', 'putyourdbnamehere' );    // The name of the database
+define( 'DB_USER', 'usernamehere' );     // Your MySQL username
+define( 'DB_PASSWORD', 'yourpasswordhere' ); // ...and password
+define( 'DB_HOST', 'localhost' );    // 99% chance you won't need to change this value
+define( 'DB_CHARSET', 'utf8' );
+define( 'DB_COLLATE', '' );
+
+// You can have multiple installations in one database if you give each a unique prefix
+$table_prefix  = 'wp_';   // Only numbers, letters, and underscores please!
+
+// Change this to localize WordPress.  A corresponding MO file for the
+// chosen language must be installed to wp-content/languages.
+// For example, install de.mo to wp-content/languages and set WPLANG to 'de'
+// to enable German language support.
+define ( 'WPLANG', '' );
+
+define( 'WP_TESTS_DOMAIN', 'example.org' );
+define( 'WP_TESTS_EMAIL', 'admin@example.org' );
+define( 'WP_TESTS_TITLE', 'Test Blog' );
+
+$table_prefix  = 'wp_';
+
+define( 'WP_PHP_BINARY', 'php' );
</ins><span class="cx">Property changes on: trunk/wp-tests-config-sample.php
</span><span class="cx">___________________________________________________________________
</span></span></pre></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
</div>

</body>
</html>