Make WordPress Core

Opened 3 years ago

Last modified 2 years ago

#53746 new task (blessed)

Tidy up the tearDown() methods

Reported by: johnbillion's profile johnbillion Owned by:
Milestone: Future Release 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 (8)

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

3 years ago

  • Keywords has-patch has-unit-tests added

#2 @johnbillion
3 years ago

  • Description modified (diff)

hellofromtonya commented on PR #1514:

3 years ago

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

#4 @hellofromTonya
3 years 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.

This ticket was mentioned in Slack in #core by mike. View the logs.

2 years ago

#6 @Toro_Unit
2 years ago


Hello. What is the current status of this ticket and want to have this patch committed in 6.0 ?

#7 @johnbillion
2 years ago

  • Milestone changed from 6.0 to Future Release
Note: See TracTickets for help on using tickets.