WordPress.org

Make WordPress Core

#45931 closed defect (bug) (fixed)

A few test tearDown() methods don't call parent::tearDown()

Reported by: desrosj Owned by: desrosj
Milestone: 5.1 Priority: normal
Severity: normal Version:
Component: Build/Test Tools Keywords: has-patch
Focuses: Cc:
PR Number:

Description

Test methods should always call parent::tearDown(). Each test method should be verified and tested.

Companion ticket to #37375

Attachments (1)

45931.diff (1017 bytes) - added by desrosj 11 months ago.

Download all attachments as: .zip

Change History (5)

#1 @desrosj
11 months ago

Looks like only one missing. But, there was also one tearDown() method that only called parent::tearDown(), so that one can be removed.

@desrosj
11 months ago

#2 @desrosj
11 months ago

  • Keywords has-patch added

#3 @desrosj
11 months ago

  • Summary changed from Several test tearDown() methods don't call parent::tearDown() to A few test tearDown() methods don't call parent::tearDown()

#4 @desrosj
11 months ago

  • Resolution set to fixed
  • Status changed from assigned to closed

In 44584:

Tests: Add missing parent::tearDown().

Also, remove a tearDown() method that was not serving any purpose.

Fixes #45931.

Note: See TracTickets for help on using tickets.