Make WordPress Core

Opened 13 months ago

Closed 6 months ago

Last modified 6 months ago

#57660 closed defect (bug) (fixed)

Tests_Formatting_MakeClickable should use data providors

Reported by: jorbin's profile jorbin Owned by: hellofromtonya's profile hellofromTonya
Milestone: 6.4 Priority: normal
Severity: normal Version:
Component: Build/Test Tools Keywords: has-patch has-unit-tests
Focuses: Cc:

Description

There are many tests in Tests_Formatting_MakeClickable that loop through arrays which means that if you have one failure, you stop running that group of tests. using a data provider would allow all the tssts to run and to catch issues quicker.

Change History (5)

#1 @hellofromTonya
11 months ago

  • Milestone changed from Awaiting Review to 6.3
  • Owner set to hellofromTonya
  • Status changed from new to assigned

Moving into 6.3 and currently working on a patch.

This ticket was mentioned in PR #4301 on WordPress/wordpress-develop by @hellofromTonya.


11 months ago
#2

  • Keywords has-patch has-unit-tests added

Removes the foreach loops from the tests by moving the in-test data sets into data providers. But in doing so, the test assertions repeat throughout the URL tests (see the 1st commit in this PR).

To remove the redundancies, the 2nd commit combines the URL data sets into one data provider to test with one test method.

Trac ticket: https://core.trac.wordpress.org/ticket/57660

#3 @audrasjb
7 months ago

  • Milestone changed from 6.3 to 6.4

Moving to milestone 6.4 as WP 6.3 RC3 has been released.

#4 @jorbin
6 months ago

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

In 56444:

Build/Tests: Tests_Formatting_MakeClickable should use data providors

Removes the foreach loops from the tests by moving the in-test data sets into data providers and combines the URL data sets into one data provider to test with one test method. By using a data providor, all the tests run rather than stopping at the first failure in this group.

Fixes #57660.
Props hellofromTonya.

Note: See TracTickets for help on using tickets.