<!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>[50449] trunk/tests/phpunit: Build/Test Tools: Fix and standardise calls to the `setUp()` and `setUpBeforeClass()` methods in the test suite.</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/50449">50449</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/50449","name":"Review Commit"}}</script></dd>
<dt style="float: left; width: 6em; font-weight: bold">Author</dt> <dd>johnbillion</dd>
<dt style="float: left; width: 6em; font-weight: bold">Date</dt> <dd>2021-02-27 16:54:52 +0000 (Sat, 27 Feb 2021)</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: Fix and standardise calls to the `setUp()` and `setUpBeforeClass()` methods in the test suite.

The parent methods should always be called before any test-specific functionality is set up, unless there is a specific and documented reason.

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

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunktestsphpunitincludestestcaseajaxphp">trunk/tests/phpunit/includes/testcase-ajax.php</a></li>
<li><a href="#trunktestsphpunitincludestestcaseblocksupportsphp">trunk/tests/phpunit/includes/testcase-block-supports.php</a></li>
<li><a href="#trunktestsphpunittestsadminincludesScreenphp">trunk/tests/phpunit/tests/admin/includesScreen.php</a></li>
<li><a href="#trunktestsphpunittestsadminbarphp">trunk/tests/phpunit/tests/adminbar.php</a></li>
<li><a href="#trunktestsphpunittestscommentgetCommentExcerptphp">trunk/tests/phpunit/tests/comment/getCommentExcerpt.php</a></li>
<li><a href="#trunktestsphpunittestscommentqueryphp">trunk/tests/phpunit/tests/comment/query.php</a></li>
<li><a href="#trunktestsphpunittestsdbdeltaphp">trunk/tests/phpunit/tests/dbdelta.php</a></li>
<li><a href="#trunktestsphpunittestsfeedwpsimplepiefilephp">trunk/tests/phpunit/tests/feed/wp-simplepie-file.php</a></li>
<li><a href="#trunktestsphpunittestsimageeditorphp">trunk/tests/phpunit/tests/image/editor.php</a></li>
<li><a href="#trunktestsphpunittestsimageeditorGdphp">trunk/tests/phpunit/tests/image/editorGd.php</a></li>
<li><a href="#trunktestsphpunittestsimageeditorImagickphp">trunk/tests/phpunit/tests/image/editorImagick.php</a></li>
<li><a href="#trunktestsphpunittestsimageresizeGdphp">trunk/tests/phpunit/tests/image/resizeGd.php</a></li>
<li><a href="#trunktestsphpunittestsimageresizeImagickphp">trunk/tests/phpunit/tests/image/resizeImagick.php</a></li>
<li><a href="#trunktestsphpunittestsmenuwalkernavmenuphp">trunk/tests/phpunit/tests/menu/walker-nav-menu.php</a></li>
<li><a href="#trunktestsphpunittestsmenuwpAjaxMenuQuickSearchphp">trunk/tests/phpunit/tests/menu/wpAjaxMenuQuickSearch.php</a></li>
<li><a href="#trunktestsphpunittestspostformatsphp">trunk/tests/phpunit/tests/post/formats.php</a></li>
<li><a href="#trunktestsphpunittestspostgetPagesphp">trunk/tests/phpunit/tests/post/getPages.php</a></li>
<li><a href="#trunktestsphpunittestsquerysetupPostdataphp">trunk/tests/phpunit/tests/query/setupPostdata.php</a></li>
<li><a href="#trunktestsphpunittestsrestapirestblockrenderercontrollerphp">trunk/tests/phpunit/tests/rest-api/rest-block-renderer-controller.php</a></li>
<li><a href="#trunktestsphpunittestsuploadphp">trunk/tests/phpunit/tests/upload.php</a></li>
<li><a href="#trunktestsphpunittestswalkerphp">trunk/tests/phpunit/tests/walker.php</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunktestsphpunitincludestestcaseajaxphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/includes/testcase-ajax.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/includes/testcase-ajax.php    2021-02-27 14:36:22 UTC (rev 50448)
+++ trunk/tests/phpunit/includes/testcase-ajax.php      2021-02-27 16:54:52 UTC (rev 50449)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -116,6 +116,8 @@
</span><span class="cx" style="display: block; padding: 0 10px">        );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">        public static function setUpBeforeClass() {
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                parent::setUpBeforeClass();
+
</ins><span class="cx" style="display: block; padding: 0 10px">                 remove_action( 'admin_init', '_maybe_update_core' );
</span><span class="cx" style="display: block; padding: 0 10px">                remove_action( 'admin_init', '_maybe_update_plugins' );
</span><span class="cx" style="display: block; padding: 0 10px">                remove_action( 'admin_init', '_maybe_update_themes' );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -126,8 +128,6 @@
</span><span class="cx" style="display: block; padding: 0 10px">                                add_action( 'wp_ajax_' . $action, 'wp_ajax_' . str_replace( '-', '_', $action ), 1 );
</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">-
-               parent::setUpBeforeClass();
</del><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></span></pre></div>
<a id="trunktestsphpunitincludestestcaseblocksupportsphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/includes/testcase-block-supports.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/includes/testcase-block-supports.php  2021-02-27 14:36:22 UTC (rev 50448)
+++ trunk/tests/phpunit/includes/testcase-block-supports.php    2021-02-27 16:54:52 UTC (rev 50449)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -16,13 +16,6 @@
</span><span class="cx" style="display: block; padding: 0 10px">        private $registered_block_names = array();
</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">-         * Sets up each test method.
-        */
-       public function setUp() {
-               parent::setUp();
-       }
-
-       /**
</del><span class="cx" style="display: block; padding: 0 10px">          * Tear down each test method.
</span><span class="cx" style="display: block; padding: 0 10px">         */
</span><span class="cx" style="display: block; padding: 0 10px">        public function tearDown() {
</span></span></pre></div>
<a id="trunktestsphpunittestsadminincludesScreenphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/tests/admin/includesScreen.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/admin/includesScreen.php        2021-02-27 14:36:22 UTC (rev 50448)
+++ trunk/tests/phpunit/tests/admin/includesScreen.php  2021-02-27 16:54:52 UTC (rev 50449)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -156,8 +156,8 @@
</span><span class="cx" style="display: block; padding: 0 10px">        );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">        function setUp() {
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                parent::setUp();
</ins><span class="cx" style="display: block; padding: 0 10px">                 set_current_screen( 'front' );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                parent::setUp();
</del><span class="cx" style="display: block; padding: 0 10px">         }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">        function tearDown() {
</span></span></pre></div>
<a id="trunktestsphpunittestsadminbarphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/tests/adminbar.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/adminbar.php    2021-02-27 14:36:22 UTC (rev 50448)
+++ trunk/tests/phpunit/tests/adminbar.php      2021-02-27 16:54:52 UTC (rev 50449)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -15,9 +15,9 @@
</span><span class="cx" style="display: block; padding: 0 10px">        protected static $user_ids = array();
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">        public static function setUpBeforeClass() {
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                parent::setUpBeforeClass();
+
</ins><span class="cx" style="display: block; padding: 0 10px">                 require_once ABSPATH . WPINC . '/class-wp-admin-bar.php';
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-
-               parent::setUpBeforeClass();
</del><span class="cx" style="display: block; padding: 0 10px">         }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">        public static function wpSetUpBeforeClass( WP_UnitTest_Factory $factory ) {
</span></span></pre></div>
<a id="trunktestsphpunittestscommentgetCommentExcerptphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/tests/comment/getCommentExcerpt.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/comment/getCommentExcerpt.php   2021-02-27 14:36:22 UTC (rev 50448)
+++ trunk/tests/phpunit/tests/comment/getCommentExcerpt.php     2021-02-27 16:54:52 UTC (rev 50449)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1,17 +1,11 @@
</span><span class="cx" style="display: block; padding: 0 10px"> <?php
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px"> class Tests_Get_Comment_Excerpt extends WP_UnitTestCase {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-        protected static $bacon_comment;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ protected static $bacon_comment = 'Bacon ipsum dolor amet porchetta capicola sirloin prosciutto brisket shankle jerky. Ham hock filet mignon boudin ground round, prosciutto alcatra spare ribs meatball turducken pork beef ribs ham beef. Bacon pastrami short loin, venison tri-tip ham short ribs doner swine. Tenderloin pig tongue pork jowl doner. Pork loin rump t-bone, beef strip steak flank drumstick tri-tip short loin capicola jowl. Cow filet mignon hamburger doner rump. Short loin jowl drumstick, tongue tail beef ribs pancetta flank brisket landjaeger chuck venison frankfurter turkey.
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-        public static function setUpBeforeClass() {
-               parent::setUpBeforeClass();
-
-               self::$bacon_comment = 'Bacon ipsum dolor amet porchetta capicola sirloin prosciutto brisket shankle jerky. Ham hock filet mignon boudin ground round, prosciutto alcatra spare ribs meatball turducken pork beef ribs ham beef. Bacon pastrami short loin, venison tri-tip ham short ribs doner swine. Tenderloin pig tongue pork jowl doner. Pork loin rump t-bone, beef strip steak flank drumstick tri-tip short loin capicola jowl. Cow filet mignon hamburger doner rump. Short loin jowl drumstick, tongue tail beef ribs pancetta flank brisket landjaeger chuck venison frankfurter turkey.
-
</del><span class="cx" style="display: block; padding: 0 10px"> Brisket shank rump, tongue beef ribs swine fatback turducken capicola meatball picanha chicken cupim meatloaf turkey. Bacon biltong shoulder tail frankfurter boudin cupim turkey drumstick. Porchetta pig shoulder, jerky flank pork tail meatball hamburger. Doner ham hock ribeye tail jerky swine. Leberkas ribeye pancetta, tenderloin capicola doner turducken chicken venison ground round boudin pork chop. Tail pork loin pig spare ribs, biltong ribeye brisket pork chop cupim. Short loin leberkas spare ribs jowl landjaeger tongue kevin flank bacon prosciutto.
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px"> Shankle pork chop prosciutto ribeye ham hock pastrami. T-bone shank brisket bacon pork chop. Cupim hamburger pork loin short loin. Boudin ball tip cupim ground round ham shoulder. Sausage rump cow tongue bresaola pork pancetta biltong tail chicken turkey hamburger. Kevin flank pork loin salami biltong. Alcatra landjaeger pastrami andouille kielbasa ham tenderloin drumstick sausage turducken tongue corned beef.';
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-        }
</del><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">        public function test_get_comment_excerpt() {
</span><span class="cx" style="display: block; padding: 0 10px">                $comment_id = self::factory()->comment->create(
</span></span></pre></div>
<a id="trunktestsphpunittestscommentqueryphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/tests/comment/query.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/comment/query.php       2021-02-27 14:36:22 UTC (rev 50448)
+++ trunk/tests/phpunit/tests/comment/query.php 2021-02-27 16:54:52 UTC (rev 50449)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -13,10 +13,6 @@
</span><span class="cx" style="display: block; padding: 0 10px">                self::$post_id = $factory->post->create();
</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">-        function setUp() {
-               parent::setUp();
-       }
-
</del><span class="cx" style="display: block; padding: 0 10px">         public function test_query() {
</span><span class="cx" style="display: block; padding: 0 10px">                $c1 = self::factory()->comment->create(
</span><span class="cx" style="display: block; padding: 0 10px">                        array(
</span></span></pre></div>
<a id="trunktestsphpunittestsdbdeltaphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/tests/dbdelta.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/dbdelta.php     2021-02-27 14:36:22 UTC (rev 50448)
+++ trunk/tests/phpunit/tests/dbdelta.php       2021-02-27 16:54:52 UTC (rev 50449)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -79,6 +79,8 @@
</span><span class="cx" style="display: block; padding: 0 10px">                        )
</span><span class="cx" style="display: block; padding: 0 10px">                );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                // This has to be called after the `CREATE TABLE` above as the `_create_temporary_tables` filter
+               // causes it to create a temporary table, and a temporary table cannot use a FULLTEXT index.
</ins><span class="cx" style="display: block; padding: 0 10px">                 parent::setUp();
</span><span class="cx" style="display: block; padding: 0 10px">        }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span></span></pre></div>
<a id="trunktestsphpunittestsfeedwpsimplepiefilephp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/tests/feed/wp-simplepie-file.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/feed/wp-simplepie-file.php      2021-02-27 14:36:22 UTC (rev 50448)
+++ trunk/tests/phpunit/tests/feed/wp-simplepie-file.php        2021-02-27 16:54:52 UTC (rev 50449)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -17,6 +17,8 @@
</span><span class="cx" style="display: block; padding: 0 10px">  */
</span><span class="cx" style="display: block; padding: 0 10px"> class Tests_WP_SimplePie_File extends WP_UnitTestCase {
</span><span class="cx" style="display: block; padding: 0 10px">        public static function setUpBeforeClass() {
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                parent::setUpBeforeClass();
+
</ins><span class="cx" style="display: block; padding: 0 10px">                 require_once ABSPATH . '/wp-includes/class-simplepie.php';
</span><span class="cx" style="display: block; padding: 0 10px">                require_once ABSPATH . '/wp-includes/class-wp-simplepie-file.php';
</span><span class="cx" style="display: block; padding: 0 10px">        }
</span></span></pre></div>
<a id="trunktestsphpunittestsimageeditorphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/tests/image/editor.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/image/editor.php        2021-02-27 14:36:22 UTC (rev 50448)
+++ trunk/tests/phpunit/tests/image/editor.php  2021-02-27 16:54:52 UTC (rev 50449)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -19,6 +19,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                require_once DIR_TESTDATA . '/../includes/mock-image-editor.php';
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                // This needs to come after the mock image editor class is loaded.
</ins><span class="cx" style="display: block; padding: 0 10px">                 parent::setUp();
</span><span class="cx" style="display: block; padding: 0 10px">        }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span></span></pre></div>
<a id="trunktestsphpunittestsimageeditorGdphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/tests/image/editorGd.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/image/editorGd.php      2021-02-27 14:36:22 UTC (rev 50448)
+++ trunk/tests/phpunit/tests/image/editorGd.php        2021-02-27 16:54:52 UTC (rev 50449)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -17,6 +17,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                require_once ABSPATH . WPINC . '/class-wp-image-editor.php';
</span><span class="cx" style="display: block; padding: 0 10px">                require_once ABSPATH . WPINC . '/class-wp-image-editor-gd.php';
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                // This needs to come after the mock image editor class is loaded.
</ins><span class="cx" style="display: block; padding: 0 10px">                 parent::setUp();
</span><span class="cx" style="display: block; padding: 0 10px">        }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span></span></pre></div>
<a id="trunktestsphpunittestsimageeditorImagickphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/tests/image/editorImagick.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/image/editorImagick.php 2021-02-27 14:36:22 UTC (rev 50448)
+++ trunk/tests/phpunit/tests/image/editorImagick.php   2021-02-27 16:54:52 UTC (rev 50449)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -18,6 +18,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                require_once ABSPATH . WPINC . '/class-wp-image-editor-imagick.php';
</span><span class="cx" style="display: block; padding: 0 10px">                require_once DIR_TESTROOT . '/includes/class-wp-test-stream.php';
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                // This needs to come after the mock image editor class is loaded.
</ins><span class="cx" style="display: block; padding: 0 10px">                 parent::setUp();
</span><span class="cx" style="display: block; padding: 0 10px">        }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span></span></pre></div>
<a id="trunktestsphpunittestsimageresizeGdphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/tests/image/resizeGd.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/image/resizeGd.php      2021-02-27 14:36:22 UTC (rev 50448)
+++ trunk/tests/phpunit/tests/image/resizeGd.php        2021-02-27 16:54:52 UTC (rev 50449)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -21,6 +21,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                require_once ABSPATH . WPINC . '/class-wp-image-editor.php';
</span><span class="cx" style="display: block; padding: 0 10px">                require_once ABSPATH . WPINC . '/class-wp-image-editor-gd.php';
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                // This needs to come after the mock image editor class is loaded.
</ins><span class="cx" style="display: block; padding: 0 10px">                 parent::setUp();
</span><span class="cx" style="display: block; padding: 0 10px">        }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span></span></pre></div>
<a id="trunktestsphpunittestsimageresizeImagickphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/tests/image/resizeImagick.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/image/resizeImagick.php 2021-02-27 14:36:22 UTC (rev 50448)
+++ trunk/tests/phpunit/tests/image/resizeImagick.php   2021-02-27 16:54:52 UTC (rev 50449)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -21,6 +21,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                require_once ABSPATH . WPINC . '/class-wp-image-editor.php';
</span><span class="cx" style="display: block; padding: 0 10px">                require_once ABSPATH . WPINC . '/class-wp-image-editor-imagick.php';
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                // This needs to come after the mock image editor class is loaded.
</ins><span class="cx" style="display: block; padding: 0 10px">                 parent::setUp();
</span><span class="cx" style="display: block; padding: 0 10px">        }
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span></span></pre></div>
<a id="trunktestsphpunittestsmenuwalkernavmenuphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/tests/menu/walker-nav-menu.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/menu/walker-nav-menu.php        2021-02-27 14:36:22 UTC (rev 50448)
+++ trunk/tests/phpunit/tests/menu/walker-nav-menu.php  2021-02-27 16:54:52 UTC (rev 50449)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -23,7 +23,6 @@
</span><span class="cx" style="display: block; padding: 0 10px">                $this->walker = new Walker_Nav_Menu();
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $this->_wp_nav_menu_max_depth = $_wp_nav_menu_max_depth;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                parent::setUp();
</del><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></span></pre></div>
<a id="trunktestsphpunittestsmenuwpAjaxMenuQuickSearchphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/tests/menu/wpAjaxMenuQuickSearch.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/menu/wpAjaxMenuQuickSearch.php  2021-02-27 14:36:22 UTC (rev 50448)
+++ trunk/tests/phpunit/tests/menu/wpAjaxMenuQuickSearch.php    2021-02-27 16:54:52 UTC (rev 50449)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -16,9 +16,10 @@
</span><span class="cx" style="display: block; padding: 0 10px">         * Set up. Workaround set_current_screen( null ) not working due to $hook_suffix not being set.
</span><span class="cx" style="display: block; padding: 0 10px">         */
</span><span class="cx" style="display: block; padding: 0 10px">        function setUp() {
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                parent::setUp();
+
</ins><span class="cx" style="display: block; padding: 0 10px">                 global $current_screen;
</span><span class="cx" style="display: block; padding: 0 10px">                $this->current_screen = $current_screen;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                parent::setUp();
</del><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></span></pre></div>
<a id="trunktestsphpunittestspostformatsphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/tests/post/formats.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/post/formats.php        2021-02-27 14:36:22 UTC (rev 50448)
+++ trunk/tests/phpunit/tests/post/formats.php  2021-02-27 16:54:52 UTC (rev 50449)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -4,10 +4,6 @@
</span><span class="cx" style="display: block; padding: 0 10px">  * @group post
</span><span class="cx" style="display: block; padding: 0 10px">  */
</span><span class="cx" style="display: block; padding: 0 10px"> class Tests_Post_Formats extends WP_UnitTestCase {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-        function setUp() {
-               parent::setUp();
-       }
-
</del><span class="cx" style="display: block; padding: 0 10px">         function test_set_get_post_format_for_post() {
</span><span class="cx" style="display: block; padding: 0 10px">                $post_id = self::factory()->post->create();
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span></span></pre></div>
<a id="trunktestsphpunittestspostgetPagesphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/tests/post/getPages.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/post/getPages.php       2021-02-27 14:36:22 UTC (rev 50448)
+++ trunk/tests/phpunit/tests/post/getPages.php 2021-02-27 16:54:52 UTC (rev 50449)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -5,10 +5,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"> class Tests_Post_GetPages extends WP_UnitTestCase {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-        function setUp() {
-               parent::setUp();
-       }
-
</del><span class="cx" style="display: block; padding: 0 10px">         /**
</span><span class="cx" style="display: block; padding: 0 10px">         * @ticket 23167
</span><span class="cx" style="display: block; padding: 0 10px">         */
</span></span></pre></div>
<a id="trunktestsphpunittestsquerysetupPostdataphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/tests/query/setupPostdata.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/query/setupPostdata.php 2021-02-27 14:36:22 UTC (rev 50448)
+++ trunk/tests/phpunit/tests/query/setupPostdata.php   2021-02-27 16:54:52 UTC (rev 50449)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -11,20 +11,6 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">        protected $pages_global;
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-        public function setUp() {
-               parent::setUp();
-               return;
-
-               foreach ( $this->global_keys as $global_key ) {
-                       if ( isset( $GLOBALS[ $global_key ] ) ) {
-                               $this->global_data[ $global_key ] = $GLOBALS[ $global_key ];
-                               unset( $GLOBALS[ $global_key ] );
-                       } else {
-                               $this->global_data[ $global_key ] = null;
-                       }
-               }
-       }
-
</del><span class="cx" style="display: block; padding: 0 10px">         public function test_id() {
</span><span class="cx" style="display: block; padding: 0 10px">                $p = self::factory()->post->create_and_get();
</span><span class="cx" style="display: block; padding: 0 10px">                setup_postdata( $p );
</span></span></pre></div>
<a id="trunktestsphpunittestsrestapirestblockrenderercontrollerphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/tests/rest-api/rest-block-renderer-controller.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/rest-api/rest-block-renderer-controller.php     2021-02-27 14:36:22 UTC (rev 50448)
+++ trunk/tests/phpunit/tests/rest-api/rest-block-renderer-controller.php       2021-02-27 16:54:52 UTC (rev 50449)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -133,11 +133,12 @@
</span><span class="cx" style="display: block; padding: 0 10px">         * @since 5.0.0
</span><span class="cx" style="display: block; padding: 0 10px">         */
</span><span class="cx" style="display: block; padding: 0 10px">        public function setUp() {
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                parent::setUp();
+
</ins><span class="cx" style="display: block; padding: 0 10px">                 $this->register_test_block();
</span><span class="cx" style="display: block; padding: 0 10px">                $this->register_post_context_test_block();
</span><span class="cx" style="display: block; padding: 0 10px">                $this->register_non_dynamic_block();
</span><span class="cx" style="display: block; padding: 0 10px">                $this->register_dynamic_block_with_boolean_attributes();
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                parent::setUp();
</del><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></span></pre></div>
<a id="trunktestsphpunittestsuploadphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/tests/upload.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/upload.php      2021-02-27 14:36:22 UTC (rev 50448)
+++ trunk/tests/phpunit/tests/upload.php        2021-02-27 16:54:52 UTC (rev 50449)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -8,8 +8,8 @@
</span><span class="cx" style="display: block; padding: 0 10px">        public $siteurl;
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">        function setUp() {
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                parent::setUp();
</ins><span class="cx" style="display: block; padding: 0 10px">                 $this->_reset_options();
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                parent::setUp();
</del><span class="cx" style="display: block; padding: 0 10px">         }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">        function _reset_options() {
</span></span></pre></div>
<a id="trunktestsphpunittestswalkerphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/tests/walker.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/walker.php      2021-02-27 14:36:22 UTC (rev 50448)
+++ trunk/tests/phpunit/tests/walker.php        2021-02-27 16:54:52 UTC (rev 50449)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -9,11 +9,9 @@
</span><span class="cx" style="display: block; padding: 0 10px"> class Tests_Walker extends WP_UnitTestCase {
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">        function setUp() {
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                parent::setUp();
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $this->walker = new Walker_Test();
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-
-               parent::setUp();
-
</del><span class="cx" style="display: block; padding: 0 10px">         }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">        function test_single_item() {
</span></span></pre>
</div>
</div>

</body>
</html>