<!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][1134] trunk/tests/export/class-wp-wxr-export.php: Reflect class rename</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/1134">1134</a></dd>
<dt>Author</dt> <dd>nbachiyski</dd>
<dt>Date</dt> <dd>2012-11-14 20:59:17 +0000 (Wed, 14 Nov 2012)</dd>
</dl>

<h3>Log Message</h3>
<pre>Reflect class rename</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunktestsexportclasswpwxrexportphp">trunk/tests/export/class-wp-wxr-export.php</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunktestsexportclasswpwxrexportphp"></a>
<div class="modfile"><h4>Modified: trunk/tests/export/class-wp-wxr-export.php (1133 => 1134)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/tests/export/class-wp-wxr-export.php        2012-11-14 04:51:54 UTC (rev 1133)
+++ trunk/tests/export/class-wp-wxr-export.php        2012-11-14 20:59:17 UTC (rev 1134)
</span><span class="lines">@@ -1,160 +1,160 @@
</span><span class="cx"> &lt;?php
</span><span class="cx"> 
</span><span class="cx"> /**
</span><del>- * Test WP_WXR_Export class
</del><ins>+ * Test WP_Export_Query class
</ins><span class="cx">  *
</span><span class="cx">  * @group export
</span><span class="cx">  * @ticket 22435
</span><span class="cx">  */
</span><del>-class Test_WP_WXR_Export extends WP_UnitTestCase {
-        function test_WP_WXR_Export_should_be_initialized_with_an_array() {
-                $export = new WP_WXR_Export( array( 'author' =&gt; 'all' ) );
</del><ins>+class Test_WP_Export_Query extends WP_UnitTestCase {
+        function test_WP_Export_Query_should_be_initialized_with_an_array() {
+                $export = new WP_Export_Query( array( 'author' =&gt; 'all' ) );
</ins><span class="cx">                 $this-&gt;assertTrue( (bool) $export );
</span><span class="cx">         }
</span><span class="cx"> 
</span><del>-        function test_WP_WXR_Export_should_use_post_ids_if_passed() {
-                $export = new WP_WXR_Export( array( 'post_ids' =&gt; array( 1, 2, 3 ) ) );
</del><ins>+        function test_WP_Export_Query_should_use_post_ids_if_passed() {
+                $export = new WP_Export_Query( array( 'post_ids' =&gt; array( 1, 2, 3 ) ) );
</ins><span class="cx">                 $this-&gt;assertEquals( array( 1, 2, 3 ), $export-&gt;post_ids() );
</span><span class="cx">         }
</span><span class="cx"> 
</span><del>-        function test_WP_WXR_Export_should_filter_all_posts_if_all_arg_is_true() {
</del><ins>+        function test_WP_Export_Query_should_filter_all_posts_if_all_arg_is_true() {
</ins><span class="cx">                 $post_id = $this-&gt;factory-&gt;post-&gt;create();
</span><del>-                $export = new WP_WXR_Export();
</del><ins>+                $export = new WP_Export_Query();
</ins><span class="cx">                 $this-&gt;assertEquals( array( $post_id ), $export-&gt;post_ids() );
</span><span class="cx">         }
</span><span class="cx"> 
</span><del>-        function test_WP_WXR_Export_should_filter_all_posts_if_no_args_passed() {
</del><ins>+        function test_WP_Export_Query_should_filter_all_posts_if_no_args_passed() {
</ins><span class="cx">                 $post_id = $this-&gt;factory-&gt;post-&gt;create();
</span><del>-                $export = new WP_WXR_Export();
</del><ins>+                $export = new WP_Export_Query();
</ins><span class="cx">                 $this-&gt;assertEquals( array( $post_id ), $export-&gt;post_ids() );
</span><span class="cx">         }
</span><span class="cx"> 
</span><del>-        function test_WP_WXR_Export_should_not_export_anything_if_post_type_arg_is_set_to_non_existing_post_type() {
</del><ins>+        function test_WP_Export_Query_should_not_export_anything_if_post_type_arg_is_set_to_non_existing_post_type() {
</ins><span class="cx">                 $post_id = $this-&gt;factory-&gt;post-&gt;create();
</span><del>-                $export = new WP_WXR_Export( array( 'post_type' =&gt; 'baba' ) );
</del><ins>+                $export = new WP_Export_Query( array( 'post_type' =&gt; 'baba' ) );
</ins><span class="cx">                 $this-&gt;assertEquals( array(), $export-&gt;post_ids() );
</span><span class="cx">         }
</span><span class="cx"> 
</span><del>-        function test_WP_WXR_Export_should_filter_only_posts_with_a_certain_post_type_if_the_post_type_arg_is_set() {
</del><ins>+        function test_WP_Export_Query_should_filter_only_posts_with_a_certain_post_type_if_the_post_type_arg_is_set() {
</ins><span class="cx">                 register_post_type( 'baba' );
</span><span class="cx">                 $post_id = $this-&gt;factory-&gt;post-&gt;create( array( 'post_type' =&gt; 'baba' ) );
</span><span class="cx">                 $_       = $this-&gt;factory-&gt;post-&gt;create( array( 'post_type' =&gt; 'dyado' ) );
</span><del>-                $export = new WP_WXR_Export( array( 'post_type' =&gt; 'baba' ) );
</del><ins>+                $export = new WP_Export_Query( array( 'post_type' =&gt; 'baba' ) );
</ins><span class="cx">                 $this-&gt;assertEquals( array( $post_id ), $export-&gt;post_ids() );
</span><span class="cx">                 _unregister_post_type( 'baba' );
</span><span class="cx">         }
</span><span class="cx"> 
</span><del>-        function test_WP_WXR_Export_should_not_export_post_types_with_can_export_set_to_false() {
</del><ins>+        function test_WP_Export_Query_should_not_export_post_types_with_can_export_set_to_false() {
</ins><span class="cx">                 register_post_type( 'non-exportable', array( 'can_export' =&gt; false ) );
</span><span class="cx">                 register_post_type( 'exportable', array( 'can_export' =&gt; true ) );
</span><span class="cx">                 $non_exportable_post_id = $this-&gt;factory-&gt;post-&gt;create( array( 'post_type' =&gt; 'non-exportable' ) );
</span><span class="cx">                 $exportable_post_id = $this-&gt;factory-&gt;post-&gt;create( array( 'post_type' =&gt; 'exportable' ) );
</span><del>-                $export = new WP_WXR_Export();
</del><ins>+                $export = new WP_Export_Query();
</ins><span class="cx">                 $this-&gt;assertEquals( array( $exportable_post_id ), $export-&gt;post_ids() );
</span><span class="cx">                 _unregister_post_type( 'non-exportable' );
</span><span class="cx">                 _unregister_post_type( 'exportable' );
</span><span class="cx">         }
</span><span class="cx"> 
</span><del>-        function test_WP_WXR_Export_should_not_export_auto_drafts_by_default() {
</del><ins>+        function test_WP_Export_Query_should_not_export_auto_drafts_by_default() {
</ins><span class="cx">                 $post_id = $this-&gt;factory-&gt;post-&gt;create( array( 'post_status' =&gt; 'auto-draft' ) );
</span><del>-                $export = new WP_WXR_Export();
</del><ins>+                $export = new WP_Export_Query();
</ins><span class="cx">                 $this-&gt;assertEquals( array(), $export-&gt;post_ids() );
</span><span class="cx">         }
</span><span class="cx"> 
</span><del>-        function test_WP_WXR_Export_should_filter_only_posts_with_certain_status_if_status_arg_is_set() {
</del><ins>+        function test_WP_Export_Query_should_filter_only_posts_with_certain_status_if_status_arg_is_set() {
</ins><span class="cx">                 $post_id_baba = $this-&gt;factory-&gt;post-&gt;create( array( 'post_status' =&gt; 'baba' ) );
</span><span class="cx">                 $post_id_dudu = $this-&gt;factory-&gt;post-&gt;create( array( 'post_status' =&gt; 'dudu' ) );
</span><del>-                $export = new WP_WXR_Export( array( 'status' =&gt; 'baba' ) );
</del><ins>+                $export = new WP_Export_Query( array( 'status' =&gt; 'baba' ) );
</ins><span class="cx">                 $this-&gt;assertEquals( array( $post_id_baba ), $export-&gt;post_ids() );
</span><span class="cx">         }
</span><span class="cx"> 
</span><del>-        function test_WP_WXR_Export_should_filter_only_posts_with_certain_author_id_if_status_arg_is_a_number() {
</del><ins>+        function test_WP_Export_Query_should_filter_only_posts_with_certain_author_id_if_status_arg_is_a_number() {
</ins><span class="cx">                 $user_id = $this-&gt;factory-&gt;user-&gt;create();
</span><span class="cx">                 $post_by_user = $this-&gt;factory-&gt;post-&gt;create( array( 'post_author' =&gt; $user_id ) );
</span><span class="cx">                 $other_post = $this-&gt;factory-&gt;post-&gt;create( array( 'post_author' =&gt; $user_id + 1 ) );
</span><del>-                $export = new WP_WXR_Export( array( 'author' =&gt; $user_id ) );
</del><ins>+                $export = new WP_Export_Query( array( 'author' =&gt; $user_id ) );
</ins><span class="cx">                 $this-&gt;assertEquals( array( $post_by_user ), $export-&gt;post_ids() );
</span><span class="cx">         }
</span><span class="cx"> 
</span><del>-        function test_WP_WXR_Export_should_filter_only_posts_with_certain_author_name_if_status_arg_is_a_username() {
</del><ins>+        function test_WP_Export_Query_should_filter_only_posts_with_certain_author_name_if_status_arg_is_a_username() {
</ins><span class="cx">                 $user = $this-&gt;factory-&gt;user-&gt;create_and_get( array( 'user_login' =&gt; 'baba' ) );
</span><span class="cx">                 $post_by_user = $this-&gt;factory-&gt;post-&gt;create( array( 'post_author' =&gt; $user-&gt;ID ) );
</span><span class="cx">                 $other_post = $this-&gt;factory-&gt;post-&gt;create( array( 'post_author' =&gt; $user-&gt;ID + 1 ) );
</span><del>-                $export = new WP_WXR_Export( array( 'author' =&gt; 'baba' ) );
</del><ins>+                $export = new WP_Export_Query( array( 'author' =&gt; 'baba' ) );
</ins><span class="cx">                 $this-&gt;assertEquals( array( $post_by_user ), $export-&gt;post_ids() );
</span><span class="cx">         }
</span><span class="cx"> 
</span><del>-        function test_WP_WXR_Export_should_filter_only_posts_with_certain_author_object_if_author_is_an_object_with_ID_member_variable() {
</del><ins>+        function test_WP_Export_Query_should_filter_only_posts_with_certain_author_object_if_author_is_an_object_with_ID_member_variable() {
</ins><span class="cx">                 $user = $this-&gt;factory-&gt;user-&gt;create_and_get();
</span><span class="cx">                 $post_by_user = $this-&gt;factory-&gt;post-&gt;create( array( 'post_author' =&gt; $user-&gt;ID ) );
</span><span class="cx">                 $other_post = $this-&gt;factory-&gt;post-&gt;create( array( 'post_author' =&gt; $user-&gt;ID + 1 ) );
</span><del>-                $export = new WP_WXR_Export( array( 'author' =&gt; $user ) );
</del><ins>+                $export = new WP_Export_Query( array( 'author' =&gt; $user ) );
</ins><span class="cx">                 $this-&gt;assertEquals( array( $post_by_user ), $export-&gt;post_ids() );
</span><span class="cx">         }
</span><span class="cx"> 
</span><del>-        function test_WP_WXR_Export_should_filter_only_posts_after_certain_start_date_if_start_date_arg_is_passed() {
</del><ins>+        function test_WP_Export_Query_should_filter_only_posts_after_certain_start_date_if_start_date_arg_is_passed() {
</ins><span class="cx">                 $post_before = $this-&gt;factory-&gt;post-&gt;create( array( 'post_date' =&gt; '2012-11-10 23:59:59' ) );
</span><span class="cx">                 $post_after = $this-&gt;factory-&gt;post-&gt;create( array( 'post_date' =&gt; '2012-11-11 00:00:00' ) );
</span><del>-                $export = new WP_WXR_Export( array( 'start_date' =&gt; '2012-11-11' ) );
</del><ins>+                $export = new WP_Export_Query( array( 'start_date' =&gt; '2012-11-11' ) );
</ins><span class="cx">                 $this-&gt;assertEquals( array( $post_after ), $export-&gt;post_ids() );
</span><span class="cx">         }
</span><span class="cx"> 
</span><del>-        function test_WP_WXR_Export_should_filter_only_posts_after_certain_end_date_if_end_date_arg_is_passed() {
</del><ins>+        function test_WP_Export_Query_should_filter_only_posts_after_certain_end_date_if_end_date_arg_is_passed() {
</ins><span class="cx">                 $post_before = $this-&gt;factory-&gt;post-&gt;create( array( 'post_date' =&gt; '2012-11-10 23:59:59' ) );
</span><span class="cx">                 $post_after = $this-&gt;factory-&gt;post-&gt;create( array( 'post_date' =&gt; '2012-11-11 00:00:00' ) );
</span><del>-                $export = new WP_WXR_Export( array( 'end_date' =&gt; '2012-11-10' ) );
</del><ins>+                $export = new WP_Export_Query( array( 'end_date' =&gt; '2012-11-10' ) );
</ins><span class="cx">                 $this-&gt;assertEquals( array( $post_before ), $export-&gt;post_ids() );
</span><span class="cx">         }
</span><span class="cx"> 
</span><del>-        function test_WP_WXR_Export_should_filter_only_posts_with_certain_category_if_category_arg_is_passed() {
</del><ins>+        function test_WP_Export_Query_should_filter_only_posts_with_certain_category_if_category_arg_is_passed() {
</ins><span class="cx">                 $category_id = $this-&gt;factory-&gt;category-&gt;create( array( 'name' =&gt; 'baba' ) );
</span><span class="cx">                 $post_with_category = $this-&gt;factory-&gt;post-&gt;create( array( 'post_category' =&gt; array( $category_id ) ) );
</span><span class="cx">                 $post_without = $this-&gt;factory-&gt;post-&gt;create();
</span><del>-                $export = new WP_WXR_Export( array( 'post_type' =&gt; 'post', 'category' =&gt; 'baba' ) );
</del><ins>+                $export = new WP_Export_Query( array( 'post_type' =&gt; 'post', 'category' =&gt; 'baba' ) );
</ins><span class="cx">                 $this-&gt;assertEquals( array( $post_with_category ), $export-&gt;post_ids() );
</span><span class="cx">         }
</span><span class="cx"> 
</span><del>-        function test_WP_WXR_Export_should_filter_only_posts_with_certain_category_id_if_category_arg_is_passed() {
</del><ins>+        function test_WP_Export_Query_should_filter_only_posts_with_certain_category_id_if_category_arg_is_passed() {
</ins><span class="cx">                 $category_id = $this-&gt;factory-&gt;category-&gt;create( array( 'name' =&gt; 'baba' ) );
</span><span class="cx">                 $post_with_category = $this-&gt;factory-&gt;post-&gt;create( array( 'post_category' =&gt; array( $category_id ) ) );
</span><span class="cx">                 $post_without = $this-&gt;factory-&gt;post-&gt;create();
</span><del>-                $export = new WP_WXR_Export( array( 'post_type' =&gt; 'post', 'category' =&gt; $category_id ) );
</del><ins>+                $export = new WP_Export_Query( array( 'post_type' =&gt; 'post', 'category' =&gt; $category_id ) );
</ins><span class="cx">                 $this-&gt;assertEquals( array( $post_with_category ), $export-&gt;post_ids() );
</span><span class="cx">         }
</span><span class="cx"> 
</span><del>-        function test_WP_WXR_Export_should_filter_posts_by_category_only_for_post_post_type() {
</del><ins>+        function test_WP_Export_Query_should_filter_posts_by_category_only_for_post_post_type() {
</ins><span class="cx">                 $category_id = $this-&gt;factory-&gt;category-&gt;create( array( 'name' =&gt; 'baba' ) );
</span><span class="cx">                 $post_with_category = $this-&gt;factory-&gt;post-&gt;create( array( 'post_category' =&gt; array( $category_id ) ) );
</span><span class="cx">                 $post_without = $this-&gt;factory-&gt;post-&gt;create();
</span><span class="cx">                 $different_post_type = $this-&gt;factory-&gt;post-&gt;create( array( 'post_type' =&gt; 'page' ) );
</span><del>-                $export = new WP_WXR_Export( array( 'category' =&gt; $category_id ) );
</del><ins>+                $export = new WP_Export_Query( array( 'category' =&gt; $category_id ) );
</ins><span class="cx">                 $this-&gt;assertEqualSets( array( $post_with_category, $post_without, $different_post_type ), $export-&gt;post_ids() );
</span><span class="cx">         }
</span><span class="cx"> 
</span><del>-        function test_WP_WXR_Export_should_include_attachments_of_posts_if_we_are_filtering_only_some_post_types() {
</del><ins>+        function test_WP_Export_Query_should_include_attachments_of_posts_if_we_are_filtering_only_some_post_types() {
</ins><span class="cx">                 register_post_type( 'baba' );
</span><span class="cx">                 $post_id = $this-&gt;factory-&gt;post-&gt;create( array( 'post_type' =&gt; 'baba' ) );
</span><span class="cx">                 $attachment_post_id = $this-&gt;factory-&gt;post-&gt;create( array( 'post_type' =&gt; 'attachment', 'post_parent' =&gt; $post_id ) );
</span><del>-                $export = new WP_WXR_Export( array( 'post_type' =&gt; 'baba' ) );
</del><ins>+                $export = new WP_Export_Query( array( 'post_type' =&gt; 'baba' ) );
</ins><span class="cx">                 $this-&gt;assertEquals( array( $post_id, $attachment_post_id ), $export-&gt;post_ids() );
</span><span class="cx">                 _unregister_post_type( 'baba' );
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         function test_export_xml_using_writer_class_returns_wp_error_if_the_writer_throws_wxr_exception() {
</span><del>-                $export = new WP_WXR_Export();
</del><ins>+                $export = new WP_Export_Query();
</ins><span class="cx">                 $this-&gt;assertTrue( is_wp_error( $export-&gt;export_xml_using_writer_class( 'Test_WP_WXR_Stub_Writer_Throws_WXR_Exception' ) ) );
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         function test_export_xml_using_writer_class_passes_the_exception_if_the_writer_throws_other_exception() {
</span><span class="cx">                 $this-&gt;setExpectedException( 'Exception' );
</span><del>-                $export = new WP_WXR_Export();
</del><ins>+                $export = new WP_Export_Query();
</ins><span class="cx">                 $export-&gt;export_xml_using_writer_class( 'Test_WP_WXR_Stub_Writer_Throws_Other_Exception' );
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         function test_authors_should_return_list_of_users_for_each_post_author() {
</span><span class="cx">                 $user_id = $this-&gt;factory-&gt;user-&gt;create();
</span><span class="cx">                 $this-&gt;factory-&gt;post-&gt;create( array( 'post_author' =&gt; $user_id ) );
</span><del>-                $export = new WP_WXR_Export();
</del><ins>+                $export = new WP_Export_Query();
</ins><span class="cx">                 $authors = $export-&gt;authors();
</span><span class="cx">                 $this-&gt;assertEquals( 1, count( $authors ) );
</span><span class="cx">                 $this-&gt;assertEquals( $user_id, $authors[0]-&gt;ID );
</span><span class="lines">@@ -162,34 +162,34 @@
</span><span class="cx"> 
</span><span class="cx">         function test_authors_should_skip_non_existing_authors() {
</span><span class="cx">                 $this-&gt;factory-&gt;post-&gt;create( array( 'post_author' =&gt; 11 ) );
</span><del>-                $export = new WP_WXR_Export();
</del><ins>+                $export = new WP_Export_Query();
</ins><span class="cx">                 $this-&gt;assertEquals( array(), $export-&gt;authors() );
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         function test_authors_should_skip_auto_draft_authors() {
</span><span class="cx">                 $user_id = $this-&gt;factory-&gt;user-&gt;create();
</span><span class="cx">                 $this-&gt;factory-&gt;post-&gt;create( array( 'post_author' =&gt; $user_id, 'post_status' =&gt; 'auto-draft' ) );
</span><del>-                $export = new WP_WXR_Export();
</del><ins>+                $export = new WP_Export_Query();
</ins><span class="cx">                 $this-&gt;assertEquals( array(), $export-&gt;authors() );
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         function test_categories_should_return_only_the_category_we_are_filtering_on() {
</span><span class="cx">                 $category_id = $this-&gt;factory-&gt;category-&gt;create( array( 'name' =&gt; 'baba' ) );
</span><span class="cx">                 $other_category_id = $this-&gt;factory-&gt;category-&gt;create( array( 'name' =&gt; 'dyado' ) );
</span><del>-                $export = new WP_WXR_Export( array( 'post_type' =&gt; 'post', 'category' =&gt; $category_id ) );
</del><ins>+                $export = new WP_Export_Query( array( 'post_type' =&gt; 'post', 'category' =&gt; $category_id ) );
</ins><span class="cx">                 $this-&gt;assertEquals( 1, count( $export-&gt;categories() ) );
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         function test_categories_should_return_no_categories_if_we_are_requesting_only_one_post_type() {
</span><span class="cx">                 $category_id = $this-&gt;factory-&gt;category-&gt;create();
</span><del>-                $export = new WP_WXR_Export( array( 'post_type' =&gt; 'post' ) );
</del><ins>+                $export = new WP_Export_Query( array( 'post_type' =&gt; 'post' ) );
</ins><span class="cx">                 $this-&gt;assertEquals( array(), $export-&gt;categories() );
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         function test_categories_should_return_all_categories_if_we_are_requesting_all_post_types() {
</span><span class="cx">                 $category_id = $this-&gt;factory-&gt;category-&gt;create();
</span><span class="cx">                 $another_category_id = $this-&gt;factory-&gt;category-&gt;create();
</span><del>-                $export = new WP_WXR_Export();
</del><ins>+                $export = new WP_Export_Query();
</ins><span class="cx">                 $this-&gt;assertEqualSets( array( 1, $category_id, $another_category_id ), self::get_term_ids( $export-&gt;categories() ) );
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="lines">@@ -197,26 +197,26 @@
</span><span class="cx">                 $child_category_id = $this-&gt;factory-&gt;category-&gt;create();
</span><span class="cx">                 $top_category_id = $this-&gt;factory-&gt;category-&gt;create();
</span><span class="cx">                 wp_update_term( $child_category_id, 'category', array( 'parent' =&gt; $top_category_id ) );
</span><del>-                $export = new WP_WXR_Export();
</del><ins>+                $export = new WP_Export_Query();
</ins><span class="cx">                 $this-&gt;assertNoChildBeforeParent( $export-&gt;categories() );
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         function test_tags_should_return_all_tags() {
</span><span class="cx">                 $tag_id = $this-&gt;factory-&gt;tag-&gt;create();
</span><del>-                $export = new WP_WXR_Export();
</del><ins>+                $export = new WP_Export_Query();
</ins><span class="cx">                 $this-&gt;assertEquals( array( $tag_id ), self::get_term_ids( $export-&gt;tags() ) );
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         function test_tags_should_return_no_tags_if_we_are_requesting_only_one_post_type() {
</span><span class="cx">                 $category_id = $this-&gt;factory-&gt;tag-&gt;create();
</span><del>-                $export = new WP_WXR_Export( array( 'post_type' =&gt; 'post' ) );
</del><ins>+                $export = new WP_Export_Query( array( 'post_type' =&gt; 'post' ) );
</ins><span class="cx">                 $this-&gt;assertEquals( array(), $export-&gt;tags() );
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         function test_custom_taxonomies_terms_should_return_all_terms() {
</span><span class="cx">                 register_taxonomy( 'taxonomy_all', 'post' );
</span><span class="cx">                 $term_id = $this-&gt;factory-&gt;term-&gt;create( array( 'taxonomy' =&gt; 'taxonomy_all' ) );
</span><del>-                $export = new WP_WXR_Export();
</del><ins>+                $export = new WP_Export_Query();
</ins><span class="cx">                 $this-&gt;assertEquals( array( $term_id ), self::get_term_ids( $export-&gt;custom_taxonomies_terms() ) );
</span><span class="cx">                 _unregister_taxonomy( 'taxonomy_all' );
</span><span class="cx">         }
</span><span class="lines">@@ -224,7 +224,7 @@
</span><span class="cx">         function test_custom_taxonomes_terms_should_return_no_terms_if_we_are_requesting_only_one_post_type() {
</span><span class="cx">                 register_taxonomy( 'taxonomy_one_post_type', 'post' );
</span><span class="cx">                 $term_id = $this-&gt;factory-&gt;term-&gt;create( array( 'taxonomy' =&gt; 'taxonomy_one_post_type' ) );
</span><del>-                $export = new WP_WXR_Export( array( 'post_type' =&gt; 'post' ) );
</del><ins>+                $export = new WP_Export_Query( array( 'post_type' =&gt; 'post' ) );
</ins><span class="cx">                 $this-&gt;assertEquals( array(), $export-&gt;custom_taxonomies_terms() );
</span><span class="cx">                 _unregister_taxonomy( 'taxonomy_one_post_type' );
</span><span class="cx">         }
</span><span class="lines">@@ -234,7 +234,7 @@
</span><span class="cx">                 $child_term_id = $this-&gt;factory-&gt;term-&gt;create( array( 'taxonomy' =&gt; 'heir' ) );
</span><span class="cx">                 $top_term_id = $this-&gt;factory-&gt;term-&gt;create( array( 'taxonomy' =&gt; 'heir' ) );
</span><span class="cx">                 wp_update_term( $child_term_id, 'heir', array( 'parent' =&gt; $top_term_id ) );
</span><del>-                $export = new WP_WXR_Export();
</del><ins>+                $export = new WP_Export_Query();
</ins><span class="cx">                 $this-&gt;assertNoChildBeforeParent( $export-&gt;custom_taxonomies_terms() );
</span><span class="cx">                 _unregister_taxonomy( 'heir' );
</span><span class="cx">         }
</span></span></pre>
</div>
</div>

</body>
</html>