Make WordPress Core


Ignore:
Timestamp:
11/05/2026 11:35:32 PM (3 days ago)
Author:
lancewillett
Message:

Tests: Remove redundant registration cleanup from post and query tests.

WP_UnitTestCase_Base::set_up() resets post types, taxonomies, and non-built-in post statuses before each test. Per-test unregister calls added to these post, query, comment, and user tests repeated that reset, so remove them.

Keep scenario-specific unregister calls and the class-level callbacks in the query fields and post status tests.

Follow-up to [64839], [64840], [64842], [64861], [64864], [64865], [64975], [65016], [65017], [65019], [65025], [65026].

Developed in: ​https://github.com/WordPress/wordpress-develop/pull/15189

Props peterwilsoncc.
See #65893.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/query/cacheResults.php

    r65030 r65284  
    7272                        )
    7373                );
    74         }
    75 
    76         public function tear_down() {
    77                 unregister_taxonomy( 'wptests_tax1' );
    78                 parent::tear_down();
    7974        }
    8075
Note: See TracChangeset for help on using the changeset viewer.