WordPress.org

Make WordPress Core

Opened 5 months ago

Closed 3 months ago

Last modified 3 months ago

#26222 closed enhancement (fixed)

Remove superseded unit tests for balanceTags()

Reported by: coffee2code Owned by: nacin
Milestone: 3.9 Priority: normal
Severity: minor Version:
Component: Formatting Keywords: has-patch has-unit-tests
Focuses: Cc:

Description

Now that #1597 and #20401 have (long since) been committed, the unit tests relating to balanceTags() can be updated to:

  • Remove tests that existed solely to test the older, more limited tag handling of the function. Tests already exist that supersede those, testing the currently more comprehensive tag handling. Inline comments confirm they can now be removed.
  • Remove references to those now-closed tickets

FYI, I was the originator of all of the tests in tests/formatting/balanceTags.php so these changes are in keeping with what was originally planned when I wrote them.

Additionally, while I was in there I fixed the dataProvider function nestable_tags() which wasn't providing the data properly. No harm since it wasn't being used anyhow, but I went ahead and adapted one of the existing tests to make use of it.

Patch attached.

Attachments (1)

26222.diff (3.1 KB) - added by coffee2code 5 months ago.

Download all attachments as: .zip

Change History (4)

coffee2code5 months ago

comment:1 nacin3 months ago

  • Component changed from Unit Tests to Formatting
  • Keywords has-unit-tests added

Looks good. We keep @ticket annotations even after the tickets are closed. Once the ticket is closed, the test runner knows not to skip them.

comment:2 nacin3 months ago

  • Owner set to nacin
  • Resolution set to fixed
  • Status changed from new to closed

In 27040:

Remove duplicated and superceded balance tags unit tests.

props coffee2code.
fixes #26222.

comment:3 ocean903 months ago

  • Milestone changed from Awaiting Review to 3.9
Note: See TracTickets for help on using tickets.