Make WordPress Core

Opened 6 months ago

Last modified 2 months ago

#53746 new task (blessed)

Tidy up the tearDown() methods

Reported by: johnbillion Owned by:
Milestone: 6.0 Priority: normal
Severity: normal Version:
Component: Build/Test Tools Keywords: has-patch has-unit-tests
Focuses: Cc:

Description (last modified by johnbillion)

The tearDown() method in several of the test classes perform redundant operations, for example removing or reinstating hooks, which are already taken care of in the base test class.

This means there's code that can be removed from these methods to tidy them up.

Related: #53011

Previously: [50463]

Change History (4)

This ticket was mentioned in PR #1514 on WordPress/wordpress-develop by johnbillion.

6 months ago

  • Keywords has-patch has-unit-tests added

#2 @johnbillion
6 months ago

  • Description modified (diff)

#3 @prbot
6 months ago

hellofromtonya commented on PR #1514:

There are a lot of global resetting happening throughout the test classes. In some cases these are duplicated for similar tests such as with the themes group. We may want to think about pulling these resets back into the framework itself instead of distributed within individual tests. This is likely beyond the scope of this PR/ticket, but does fit into Trac https://core.trac.wordpress.org/ticket/53011.

#4 @hellofromTonya
2 months ago

  • Milestone changed from 5.9 to 6.0

5.9 is in Feature Freeze and focus is on defects. With less than a week until Beta 1, there's likely not time to in the 5.9 cycle to focus on this initiative. Let's get it done in 6.0.

As tests can be committed at anytime into trunk, if someone has the time, please pull it back in and commit.

Note: See TracTickets for help on using tickets.