<!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>[47331] branches/4.0/tests/phpunit/tests: Build/Test Tools: Merge some test fixes to the 4.0 branch, for consistency with other branches.</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { white-space: pre-line; overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta" style="font-size: 105%">
<dt style="float: left; width: 6em; font-weight: bold">Revision</dt> <dd><a style="font-weight: bold" href="https://core.trac.wordpress.org/changeset/47331">47331</a><script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","description":"Review this Commit","action":{"@type":"ViewAction","url":"https://core.trac.wordpress.org/changeset/47331","name":"Review Commit"}}</script></dd>
<dt style="float: left; width: 6em; font-weight: bold">Author</dt> <dd>SergeyBiryukov</dd>
<dt style="float: left; width: 6em; font-weight: bold">Date</dt> <dd>2020-02-20 17:43:23 +0000 (Thu, 20 Feb 2020)</dd>
</dl>

<pre style='padding-left: 1em; margin: 2em 0; border-left: 2px solid #ccc; line-height: 1.25; font-size: 105%; font-family: sans-serif'>Build/Test Tools: Merge some test fixes to the 4.0 branch, for consistency with other branches.

This backports <a href="https://core.trac.wordpress.org/changeset/30518">[30518]</a>, <a href="https://core.trac.wordpress.org/changeset/30520">[30520]</a>, <a href="https://core.trac.wordpress.org/changeset/30526">[30526]</a>, [31253-31254], <a href="https://core.trac.wordpress.org/changeset/31257">[31257]</a>.

See <a href="https://core.trac.wordpress.org/ticket/49485">#49485</a>.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#branches40testsphpunitincludestestcasephp">branches/4.0/tests/phpunit/includes/testcase.php</a></li>
<li><a href="#branches40testsphpunittestsfunctionsphp">branches/4.0/tests/phpunit/tests/functions.php</a></li>
<li><a href="#branches40testsphpunittestsimageresizephp">branches/4.0/tests/phpunit/tests/image/resize.php</a></li>
<li><a href="#branches40testsphpunittestsimageresize_gdphp">branches/4.0/tests/phpunit/tests/image/resize_gd.php</a></li>
</ul>

<h3>Removed Paths</h3>
<ul>
<li><a href="#branches40testsphpunittestsexportclasswpexportqueryphp">branches/4.0/tests/phpunit/tests/export/class-wp-export-query.php</a></li>
<li><a href="#branches40testsphpunittestsexportfunctionsexportphp">branches/4.0/tests/phpunit/tests/export/functions.export.php</a></li>
<li><a href="#branches40testsphpunittestsexportwritersphp">branches/4.0/tests/phpunit/tests/export/writers.php</a></li>
<li><a href="#branches40testsphpunittestsiteratorsphp">branches/4.0/tests/phpunit/tests/iterators.php</a></li>
</ul>

<h3>Property Changed</h3>
<ul>
<li><a href="#branches40">branches/4.0/</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<span class="cx" style="display: block; padding: 0 10px">Index: branches/4.0
</span><span class="cx" style="display: block; padding: 0 10px">===================================================================
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">--- branches/4.0 2020-02-20 17:16:21 UTC (rev 47330)
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+++ branches/4.0  2020-02-20 17:43:23 UTC (rev 47331)
</ins><a id="branches40"></a>
<div class="propset"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Property changes: branches/4.0</h4>
<pre class="diff"><span>
</span></pre></div>
<a id="svnmergeinfo"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: svn:mergeinfo</h4></div>
<span class="cx" style="display: block; padding: 0 10px"> /branches/4.8:42478
</span><span class="cx" style="display: block; padding: 0 10px"> /branches/4.9:42434
</span><span class="cx" style="display: block; padding: 0 10px"> /branches/5.0:43988,43994,44014,44017,44047
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-/trunk:29723-29725,29727,29730,29733,29738,29745-29746,29751,29755,29765-29766,29777,29783,29829,29860,29869,29884,29886,29954,29979,30001,30090,30160,30185,30242,30263-30264,30282,30285,30378,30401,30412,30417,30422,30425,30430,30435,30438,30443,30458,30466,30513-30514,30517,30519,30521,30529-30530,31258-31259,33124,33142,33374,36083,36435,37651,38524,39645,39659,39759,39772,39795,39807-39808,39831,39850,39956,40148,40160,40169,40183,40241,40400,40538,40604,40677,40692,40704,40723,40736,41072,41393,41395,41398,41457,41470,41483,41496,41522,41662,42056,42119-42120,42258-42261,42424,42433,42892-42893,44021,44048,44842,44993,45936,45971,45997,46895
</del><span class="cx" style="display: block; padding: 0 10px">\ No newline at end of property
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+/trunk:29723-29725,29727,29730,29733,29738,29745-29746,29751,29755,29765-29766,29777,29783,29829,29860,29869,29884,29886,29954,29979,30001,30090,30160,30185,30242,30263-30264,30282,30285,30378,30401,30412,30417,30422,30425,30430,30435,30438,30443,30458,30466,30513-30514,30517-30521,30526,30529-30530,31253-31254,31257-31259,33124,33142,33374,36083,36435,37651,38524,39645,39659,39759,39772,39795,39807-39808,39831,39850,39956,40148,40160,40169,40183,40241,40400,40538,40604,40677,40692,40704,40723,40736,41072,41393,41395,41398,41457,41470,41483,41496,41522,41662,42056,42119-42120,42258-42261,42424,42433,42892-42893,44021,44048,44842,44993,45936,45971,45997,46895
</ins><span class="cx" style="display: block; padding: 0 10px">\ No newline at end of property
</span><a id="branches40testsphpunitincludestestcasephp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: branches/4.0/tests/phpunit/includes/testcase.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/4.0/tests/phpunit/includes/testcase.php  2020-02-20 17:16:21 UTC (rev 47330)
+++ branches/4.0/tests/phpunit/includes/testcase.php    2020-02-20 17:43:23 UTC (rev 47331)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -327,6 +327,12 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">        protected function checkRequirements() {
</span><span class="cx" style="display: block; padding: 0 10px">                parent::checkRequirements();
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+               // Core tests no longer check against open Trac tickets, but others using WP_UnitTestCase may do so.
+               if ( defined( 'WP_RUN_CORE_TESTS' ) && WP_RUN_CORE_TESTS ) {
+                       return;
+               }
+
</ins><span class="cx" style="display: block; padding: 0 10px">                 if ( WP_TESTS_FORCE_KNOWN_BUGS )
</span><span class="cx" style="display: block; padding: 0 10px">                        return;
</span><span class="cx" style="display: block; padding: 0 10px">                $tickets = PHPUnit_Util_Test::getTickets( get_class( $this ), $this->getName( false ) );
</span></span></pre></div>
<a id="branches40testsphpunittestsexportclasswpexportqueryphp"></a>
<div class="delfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Deleted: branches/4.0/tests/phpunit/tests/export/class-wp-export-query.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/4.0/tests/phpunit/tests/export/class-wp-export-query.php 2020-02-20 17:16:21 UTC (rev 47330)
+++ branches/4.0/tests/phpunit/tests/export/class-wp-export-query.php   2020-02-20 17:43:23 UTC (rev 47331)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1,256 +0,0 @@
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-<?php
-
-/**
- * Test WP_Export_Query class
- *
- * @group export
- * @ticket 22435
- */
-class Test_WP_Export_Query extends WP_UnitTestCase {
-       function setUp() {
-               if ( ! class_exists( 'WP_Export_Query' ) ) {
-                       $this->markTestSkipped( "WP_Export_Query class doesn't exist" );
-               }
-
-               parent::setUp();
-       }
-
-       function test_WP_Export_Query_should_be_initialized_with_an_array() {
-               $export = new WP_Export_Query( array( 'author' => 'all' ) );
-               $this->assertTrue( (bool) $export );
-       }
-
-       function test_WP_Export_Query_should_use_post_ids_if_passed() {
-               $export = new WP_Export_Query( array( 'post_ids' => array( 1, 2, 3 ) ) );
-               $this->assertEquals( array( 1, 2, 3 ), $export->post_ids() );
-       }
-
-       function test_WP_Export_Query_should_filter_all_posts_if_all_arg_is_true() {
-               $post_id = $this->factory->post->create();
-               $export = new WP_Export_Query();
-               $this->assertEquals( array( $post_id ), $export->post_ids() );
-       }
-
-       function test_WP_Export_Query_should_filter_all_posts_if_no_args_passed() {
-               $post_id = $this->factory->post->create();
-               $export = new WP_Export_Query();
-               $this->assertEquals( array( $post_id ), $export->post_ids() );
-       }
-
-       function test_WP_Export_Query_should_not_export_anything_if_post_type_arg_is_set_to_non_existing_post_type() {
-               $post_id = $this->factory->post->create();
-               $export = new WP_Export_Query( array( 'post_type' => 'baba' ) );
-               $this->assertEquals( array(), $export->post_ids() );
-       }
-
-       function test_WP_Export_Query_should_filter_only_posts_with_a_certain_post_type_if_the_post_type_arg_is_set() {
-               register_post_type( 'baba' );
-               $post_id = $this->factory->post->create( array( 'post_type' => 'baba' ) );
-               $_       = $this->factory->post->create( array( 'post_type' => 'dyado' ) );
-               $export = new WP_Export_Query( array( 'post_type' => 'baba' ) );
-               $this->assertEquals( array( $post_id ), $export->post_ids() );
-               _unregister_post_type( 'baba' );
-       }
-
-       function test_WP_Export_Query_should_not_export_post_types_with_can_export_set_to_false() {
-               register_post_type( 'non-exportable', array( 'can_export' => false ) );
-               register_post_type( 'exportable', array( 'can_export' => true ) );
-               $non_exportable_post_id = $this->factory->post->create( array( 'post_type' => 'non-exportable' ) );
-               $exportable_post_id = $this->factory->post->create( array( 'post_type' => 'exportable' ) );
-               $export = new WP_Export_Query();
-               $this->assertEquals( array( $exportable_post_id ), $export->post_ids() );
-               _unregister_post_type( 'non-exportable' );
-               _unregister_post_type( 'exportable' );
-       }
-
-       function test_WP_Export_Query_should_not_export_auto_drafts_by_default() {
-               $post_id = $this->factory->post->create( array( 'post_status' => 'auto-draft' ) );
-               $export = new WP_Export_Query();
-               $this->assertEquals( array(), $export->post_ids() );
-       }
-
-       function test_WP_Export_Query_should_filter_only_posts_with_certain_status_if_status_arg_is_set() {
-               $post_id_baba = $this->factory->post->create( array( 'post_status' => 'baba' ) );
-               $post_id_dudu = $this->factory->post->create( array( 'post_status' => 'dudu' ) );
-               $export = new WP_Export_Query( array( 'status' => 'baba' ) );
-               $this->assertEquals( array( $post_id_baba ), $export->post_ids() );
-       }
-
-       function test_WP_Export_Query_should_filter_only_posts_with_certain_author_id_if_status_arg_is_a_number() {
-               $user_id = $this->factory->user->create();
-               $post_by_user = $this->factory->post->create( array( 'post_author' => $user_id ) );
-               $other_post = $this->factory->post->create( array( 'post_author' => $user_id + 1 ) );
-               $export = new WP_Export_Query( array( 'author' => $user_id ) );
-               $this->assertEquals( array( $post_by_user ), $export->post_ids() );
-       }
-
-       function test_WP_Export_Query_should_filter_only_posts_with_certain_author_name_if_status_arg_is_a_username() {
-               $user = $this->factory->user->create_and_get( array( 'user_login' => 'baba' ) );
-               $post_by_user = $this->factory->post->create( array( 'post_author' => $user->ID ) );
-               $other_post = $this->factory->post->create( array( 'post_author' => $user->ID + 1 ) );
-               $export = new WP_Export_Query( array( 'author' => 'baba' ) );
-               $this->assertEquals( array( $post_by_user ), $export->post_ids() );
-       }
-
-       function test_WP_Export_Query_should_filter_only_posts_with_certain_author_object_if_author_is_an_object_with_ID_member_variable() {
-               $user = $this->factory->user->create_and_get();
-               $post_by_user = $this->factory->post->create( array( 'post_author' => $user->ID ) );
-               $other_post = $this->factory->post->create( array( 'post_author' => $user->ID + 1 ) );
-               $export = new WP_Export_Query( array( 'author' => $user ) );
-               $this->assertEquals( array( $post_by_user ), $export->post_ids() );
-       }
-
-       function test_WP_Export_Query_should_filter_only_posts_after_certain_start_date_if_start_date_arg_is_passed() {
-               $post_before = $this->factory->post->create( array( 'post_date' => '2012-11-10 23:59:59' ) );
-               $post_after = $this->factory->post->create( array( 'post_date' => '2012-11-11 00:00:00' ) );
-               $export = new WP_Export_Query( array( 'start_date' => '2012-11-11' ) );
-               $this->assertEquals( array( $post_after ), $export->post_ids() );
-       }
-
-       function test_WP_Export_Query_should_filter_only_posts_after_certain_end_date_if_end_date_arg_is_passed() {
-               $post_before = $this->factory->post->create( array( 'post_date' => '2012-11-10 23:59:59' ) );
-               $post_after = $this->factory->post->create( array( 'post_date' => '2012-11-11 00:00:00' ) );
-               $export = new WP_Export_Query( array( 'end_date' => '2012-11-10' ) );
-               $this->assertEquals( array( $post_before ), $export->post_ids() );
-       }
-
-       function test_WP_Export_Query_should_filter_only_posts_with_certain_category_if_category_arg_is_passed() {
-               $category_id = $this->factory->category->create( array( 'name' => 'baba' ) );
-               $post_with_category = $this->factory->post->create( array( 'post_category' => array( $category_id ) ) );
-               $post_without = $this->factory->post->create();
-               $export = new WP_Export_Query( array( 'post_type' => 'post', 'category' => 'baba' ) );
-               $this->assertEquals( array( $post_with_category ), $export->post_ids() );
-       }
-
-       function test_WP_Export_Query_should_filter_only_posts_with_certain_category_id_if_category_arg_is_passed() {
-               $category_id = $this->factory->category->create( array( 'name' => 'baba' ) );
-               $post_with_category = $this->factory->post->create( array( 'post_category' => array( $category_id ) ) );
-               $post_without = $this->factory->post->create();
-               $export = new WP_Export_Query( array( 'post_type' => 'post', 'category' => $category_id ) );
-               $this->assertEquals( array( $post_with_category ), $export->post_ids() );
-       }
-
-       function test_WP_Export_Query_should_filter_posts_by_category_only_for_post_post_type() {
-               $category_id = $this->factory->category->create( array( 'name' => 'baba' ) );
-               $post_with_category = $this->factory->post->create( array( 'post_category' => array( $category_id ) ) );
-               $post_without = $this->factory->post->create();
-               $different_post_type = $this->factory->post->create( array( 'post_type' => 'page' ) );
-               $export = new WP_Export_Query( array( 'category' => $category_id ) );
-               $this->assertEqualSets( array( $post_with_category, $post_without, $different_post_type ), $export->post_ids() );
-       }
-
-       function test_WP_Export_Query_should_include_attachments_of_posts_if_we_are_filtering_only_some_post_types() {
-               register_post_type( 'baba' );
-               $post_id = $this->factory->post->create( array( 'post_type' => 'baba' ) );
-               $attachment_post_id = $this->factory->post->create( array( 'post_type' => 'attachment', 'post_parent' => $post_id ) );
-               $export = new WP_Export_Query( array( 'post_type' => 'baba' ) );
-               $this->assertEquals( array( $post_id, $attachment_post_id ), $export->post_ids() );
-               _unregister_post_type( 'baba' );
-       }
-
-       function test_authors_should_return_list_of_users_for_each_post_author() {
-               $user_id = $this->factory->user->create();
-               $this->factory->post->create( array( 'post_author' => $user_id ) );
-               $export = new WP_Export_Query();
-               $authors = $export->authors();
-               $this->assertEquals( 1, count( $authors ) );
-               $this->assertEquals( $user_id, $authors[0]->ID );
-       }
-
-       function test_authors_should_skip_non_existing_authors() {
-               $this->factory->post->create( array( 'post_author' => 11 ) );
-               $export = new WP_Export_Query();
-               $this->assertEquals( array(), $export->authors() );
-       }
-
-       function test_authors_should_skip_auto_draft_authors() {
-               $user_id = $this->factory->user->create();
-               $this->factory->post->create( array( 'post_author' => $user_id, 'post_status' => 'auto-draft' ) );
-               $export = new WP_Export_Query();
-               $this->assertEquals( array(), $export->authors() );
-       }
-
-       function test_categories_should_return_only_the_category_we_are_filtering_on() {
-               $category_id = $this->factory->category->create( array( 'name' => 'baba' ) );
-               $other_category_id = $this->factory->category->create( array( 'name' => 'dyado' ) );
-               $export = new WP_Export_Query( array( 'post_type' => 'post', 'category' => $category_id ) );
-               $this->assertEquals( 1, count( $export->categories() ) );
-       }
-
-       function test_categories_should_return_no_categories_if_we_are_requesting_only_one_post_type() {
-               $category_id = $this->factory->category->create();
-               $export = new WP_Export_Query( array( 'post_type' => 'post' ) );
-               $this->assertEquals( array(), $export->categories() );
-       }
-
-       function test_categories_should_return_all_categories_if_we_are_requesting_all_post_types() {
-               $category_id = $this->factory->category->create();
-               $another_category_id = $this->factory->category->create();
-               $export = new WP_Export_Query();
-               $this->assertEqualSets( array( 1, $category_id, $another_category_id ), self::get_term_ids( $export->categories() ) );
-       }
-
-       function test_categories_should_not_return_a_child_before_its_parent_category() {
-               $child_category_id = $this->factory->category->create();
-               $top_category_id = $this->factory->category->create();
-               wp_update_term( $child_category_id, 'category', array( 'parent' => $top_category_id ) );
-               $export = new WP_Export_Query();
-               $this->assertNoChildBeforeParent( $export->categories() );
-       }
-
-       function test_tags_should_return_all_tags() {
-               $tag_id = $this->factory->tag->create();
-               $export = new WP_Export_Query();
-               $this->assertEquals( array( $tag_id ), self::get_term_ids( $export->tags() ) );
-       }
-
-       function test_tags_should_return_no_tags_if_we_are_requesting_only_one_post_type() {
-               $category_id = $this->factory->tag->create();
-               $export = new WP_Export_Query( array( 'post_type' => 'post' ) );
-               $this->assertEquals( array(), $export->tags() );
-       }
-
-       function test_custom_taxonomies_terms_should_return_all_terms() {
-               register_taxonomy( 'taxonomy_all', 'post' );
-               $term_id = $this->factory->term->create( array( 'taxonomy' => 'taxonomy_all' ) );
-               $export = new WP_Export_Query();
-               $this->assertEquals( array( $term_id ), self::get_term_ids( $export->custom_taxonomies_terms() ) );
-               _unregister_taxonomy( 'taxonomy_all' );
-       }
-
-       function test_custom_taxonomes_terms_should_return_no_terms_if_we_are_requesting_only_one_post_type() {
-               register_taxonomy( 'taxonomy_one_post_type', 'post' );
-               $term_id = $this->factory->term->create( array( 'taxonomy' => 'taxonomy_one_post_type' ) );
-               $export = new WP_Export_Query( array( 'post_type' => 'post' ) );
-               $this->assertEquals( array(), $export->custom_taxonomies_terms() );
-               _unregister_taxonomy( 'taxonomy_one_post_type' );
-       }
-
-       function test_custom_taxonomies_terms_should_not_return_a_child_before_its_parent_term() {
-               register_taxonomy( 'heir', 'post', array( 'hierarchical' => true ) );
-               $child_term_id = $this->factory->term->create( array( 'taxonomy' => 'heir' ) );
-               $top_term_id = $this->factory->term->create( array( 'taxonomy' => 'heir' ) );
-               wp_update_term( $child_term_id, 'heir', array( 'parent' => $top_term_id ) );
-               $export = new WP_Export_Query();
-               $this->assertNoChildBeforeParent( $export->custom_taxonomies_terms() );
-               _unregister_taxonomy( 'heir' );
-       }
-
-       private function assertNoChildBeforeParent( $terms ) {
-               $visited = array();
-               foreach( $terms as $term ) {
-                       $this->assertTrue( isset( $visited[$term->parent] ) || !$term->parent );
-                       $visited[$term->term_id] = true;
-               }
-       }
-
-       private static function get_term_ids( $terms ) {
-               return array_values( array_map( array( __CLASS__, '_get_term_ids_cb' ), $terms ) );
-       }
-
-       private static function _get_term_ids_cb( $c ) {
-               return intval( $c->term_id );
-       }
-
-}
-
</del></span></pre></div>
<a id="branches40testsphpunittestsexportfunctionsexportphp"></a>
<div class="delfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Deleted: branches/4.0/tests/phpunit/tests/export/functions.export.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/4.0/tests/phpunit/tests/export/functions.export.php      2020-02-20 17:16:21 UTC (rev 47330)
+++ branches/4.0/tests/phpunit/tests/export/functions.export.php        2020-02-20 17:43:23 UTC (rev 47331)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1,43 +0,0 @@
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-<?php
-
-/**
- * Test export functions
- *
- * @group export
- * @ticket 22435
- */
-class Test_WP_Export_Functions extends WP_UnitTestCase {
-       function setUp() {
-               if ( ! function_exists( 'wp_export' ) ) {
-                       $this->markTestSkipped( "wp_export function doesn't exist" );
-               }
-
-               parent::setUp();
-       }
-       
-       function test_wp_export_returns_wp_error_if_the_writer_throws_Export_exception() {
-               $this->assertTrue( is_wp_error( wp_export( array( 'writer' => 'Test_WP_Export_Stub_Writer_Throws_Export_Exception' ) ) ) );
-       }
-
-       function test_wp_export_passes_the_exception_if_the_writer_throws_other_exception() {
-               $this->setExpectedException( 'Exception' );
-               wp_export( array( 'writer' => 'Test_WP_Export_Stub_Writer_Throws_Other_Exception' ) );
-       }
-
-}
-
-class Test_WP_Export_Stub_Writer_Throws_Export_Exception {
-       function __construct( $formatter ) {
-       }
-       function export() {
-               throw new WP_Export_Exception( 'baba' );
-       }
-}
-
-class Test_WP_Export_Stub_Writer_Throws_Other_Exception {
-       function __construct( $formatter ) {
-       }
-       function export() {
-               throw new Exception( 'baba' );
-       }
-}
</del></span></pre></div>
<a id="branches40testsphpunittestsexportwritersphp"></a>
<div class="delfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Deleted: branches/4.0/tests/phpunit/tests/export/writers.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/4.0/tests/phpunit/tests/export/writers.php       2020-02-20 17:16:21 UTC (rev 47330)
+++ branches/4.0/tests/phpunit/tests/export/writers.php 2020-02-20 17:43:23 UTC (rev 47331)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1,28 +0,0 @@
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-<?php
-
-/**
- * Test WP_Export_*_Writer classes
- *
- * @group export
- * @ticket 22435
- */
-class Test_WP_Export_Writers extends WP_UnitTestCase {
-       function test_export_returner_returns_all_the_return_values() {
-               if ( ! class_exists( 'WP_Export_Returner' ) ) {
-                       $this->markTestSkipped( "WP_Export_Returner class doesn't exist" );
-               }
-               $returner = new WP_Export_Returner( $this->get_x_formatter() );
-               $this->assertEquals( 'xxx' , $returner->export() );
-       }
-
-       private function get_x_formatter() {
-               $methods = array( 'before_posts', 'posts', 'after_posts' );
-               $formatter = $this->getMock( 'WP_Export_WXR_Formatter', $methods, array( null ) );
-               foreach( $methods as $method ) {
-                       $return = 'posts' == $method? array( 'x' ) : 'x';
-                       $formatter->expects( $this->once() )->method( $method )->with()->will( $this->returnValue( $return ) );
-               }
-               return $formatter;
-       }
-}
-
</del></span></pre></div>
<a id="branches40testsphpunittestsfunctionsphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: branches/4.0/tests/phpunit/tests/functions.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/4.0/tests/phpunit/tests/functions.php    2020-02-20 17:16:21 UTC (rev 47330)
+++ branches/4.0/tests/phpunit/tests/functions.php      2020-02-20 17:43:23 UTC (rev 47331)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -131,6 +131,32 @@
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertEquals( 'abcdefg.png', wp_unique_filename( $testdir, 'abcde\\\fg.png' ), 'Tripple slashed not removed' );
</span><span class="cx" style="display: block; padding: 0 10px">        }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+        function test_is_serialized() {
+               $cases = array(
+                       serialize(null),
+                       serialize(true),
+                       serialize(false),
+                       serialize(-25),
+                       serialize(25),
+                       serialize(1.1),
+                       serialize('this string will be serialized'),
+                       serialize("a\nb"),
+                       serialize(array()),
+                       serialize(array(1,1,2,3,5,8,13)),
+                       serialize( (object)array('test' => true, '3', 4) )
+               );
+               foreach ( $cases as $case )
+                       $this->assertTrue( is_serialized($case), "Serialized data: $case" );
+
+               $not_serialized = array(
+                       'a string',
+                       'garbage:a:0:garbage;',
+                       's:4:test;'
+               );
+               foreach ( $not_serialized as $case )
+                       $this->assertFalse( is_serialized($case), "Test data: $case" );
+       }
+
</ins><span class="cx" style="display: block; padding: 0 10px">         /**
</span><span class="cx" style="display: block; padding: 0 10px">         * @group add_query_arg
</span><span class="cx" style="display: block; padding: 0 10px">         */
</span></span></pre></div>
<a id="branches40testsphpunittestsimageresizephp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: branches/4.0/tests/phpunit/tests/image/resize.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/4.0/tests/phpunit/tests/image/resize.php 2020-02-20 17:16:21 UTC (rev 47330)
+++ branches/4.0/tests/phpunit/tests/image/resize.php   2020-02-20 17:43:23 UTC (rev 47331)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -138,17 +138,6 @@
</span><span class="cx" style="display: block; padding: 0 10px">        }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">        /**
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-         * Try resizing a php file (bad image)
-        * @ticket 6821
-        */
-       public function test_resize_bad_image() {
-               $image = $this->resize_helper( DIR_TESTDATA.'/export/crazy-cdata.xml', 25, 25 );
-               $this->assertInstanceOf( 'WP_Error', $image );
-               $this->assertEquals( 'invalid_image', $image->get_error_code() );
-       }
-
-
-       /**
</del><span class="cx" style="display: block; padding: 0 10px">          * Function to help out the tests
</span><span class="cx" style="display: block; padding: 0 10px">         */
</span><span class="cx" style="display: block; padding: 0 10px">        protected function resize_helper( $file, $width, $height, $crop = false ) {
</span></span></pre></div>
<a id="branches40testsphpunittestsimageresize_gdphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: branches/4.0/tests/phpunit/tests/image/resize_gd.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/4.0/tests/phpunit/tests/image/resize_gd.php      2020-02-20 17:16:21 UTC (rev 47330)
+++ branches/4.0/tests/phpunit/tests/image/resize_gd.php        2020-02-20 17:43:23 UTC (rev 47331)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -22,4 +22,16 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                parent::setUp();
</span><span class="cx" style="display: block; padding: 0 10px">        }
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-}
</del><span class="cx" style="display: block; padding: 0 10px">\ No newline at end of file
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+       /**
+        * Try resizing a php file (bad image)
+        * @ticket 6821
+        */
+       public function test_resize_bad_image() {
+
+               $image = $this->resize_helper( DIR_TESTDATA.'/export/crazy-cdata.xml', 25, 25 );
+               $this->assertInstanceOf( 'WP_Error', $image );
+               $this->assertEquals( 'invalid_image', $image->get_error_code() );
+       }
+
+}
</ins></span></pre></div>
<a id="branches40testsphpunittestsiteratorsphp"></a>
<div class="delfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Deleted: branches/4.0/tests/phpunit/tests/iterators.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/4.0/tests/phpunit/tests/iterators.php    2020-02-20 17:16:21 UTC (rev 47330)
+++ branches/4.0/tests/phpunit/tests/iterators.php      2020-02-20 17:43:23 UTC (rev 47331)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1,53 +0,0 @@
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-<?php
-
-/**
- * @ticket 22435
- */
-class Test_WP_Post_IDs_Iterator extends WP_UnitTestCase {
-       function setUp() {
-               if ( ! class_exists( 'WP_Post_IDs_Iterator' ) ) {
-                       $this->markTestSkipped( "WP_Post_IDs_Iterator class doesn't exist" );
-               }
-
-               parent::setUp();
-       }
-
-       function test_create() {
-               new WP_Post_IDs_Iterator( array( 1, 2, 3 ) );
-       }
-
-       function test_no_posts() {
-               $this->assertIteratorReturnsSamePostIDs( array() );
-       }
-
-       function test_less_ids_than_limit() {
-               $post_id_0 = $this->factory->post->create();
-               $post_id_1 = $this->factory->post->create();
-               $this->assertIteratorReturnsSamePostIDs( array( $post_id_0, $post_id_1 ), 10 );
-       }
-
-       function test_ids_exactly_as_limit() {
-               $post_id_0 = $this->factory->post->create();
-               $post_id_1 = $this->factory->post->create();
-               $this->assertIteratorReturnsSamePostIDs( array( $post_id_0, $post_id_1 ), 2 );
-       }
-
-       function test_more_ids_than_limit() {
-               $post_id_0 = $this->factory->post->create();
-               $post_id_1 = $this->factory->post->create();
-               $post_id_2 = $this->factory->post->create();
-               $this->assertIteratorReturnsSamePostIDs( array( $post_id_0, $post_id_1, $post_id_2 ), 2 );
-       }
-
-       function test_ids_exactly_twice_more_than_limit() {
-               $post_id_0 = $this->factory->post->create();
-               $post_id_1 = $this->factory->post->create();
-               $post_id_2 = $this->factory->post->create();
-               $post_id_3 = $this->factory->post->create();
-               $this->assertIteratorReturnsSamePostIDs( array( $post_id_0, $post_id_1, $post_id_2, $post_id_3 ), 2 );
-       }
-
-       private function assertIteratorReturnsSamePostIDs( $post_ids, $limit = 2 ) {
-               $this->assertEquals( $post_ids, wp_list_pluck( iterator_to_array( new WP_Post_IDs_Iterator( $post_ids, $limit ) ), 'ID' ) );
-       }
-}
</del></span></pre>
</div>
</div>

</body>
</html>