WordPress.org

Make WordPress Core

Opened 10 days ago

Last modified 9 days ago

#53746 new task (blessed)

Tidy up the tearDown() methods

Reported by: johnbillion Owned by:
Milestone: 5.9 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 (3)

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


10 days ago

  • Keywords has-patch has-unit-tests added

#2 @johnbillion
10 days ago

  • Description modified (diff)

#3 @prbot
9 days 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.

Note: See TracTickets for help on using tickets.