Make WordPress Core

Opened 4 years ago

Closed 3 years ago

Last modified 3 years ago

#57660 closed defect (bug) (fixed)

Tests_Formatting_MakeClickable should use data providors

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

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
3 years ago

  • Milestone Awaiting Review6.3
  • Owner set to hellofromTonya
  • Status newassigned

Moving into 6.3 and currently working on a patch.

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


3 years 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
3 years ago

  • Milestone 6.36.4

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

#4 @jorbin
3 years ago

  • Resolutionfixed
  • Status assignedclosed

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.