WordPress.org

Make WordPress Core

Opened 4 years ago

Last modified 2 years ago

#31313 new enhancement

refactor is_email() tests to use separate data files and PHPUnit dataProvider

Reported by: salcode Owned by:
Milestone: Future Release Priority: normal
Severity: normal Version:
Component: Build/Test Tools Keywords: is-email has-patch needs-refresh
Focuses: Cc:

Description

There are a number of open tickets involving email validation that seem as though they could benefit from making the tests on is_email() a little more robust.

This is my first pass at that.

Ultimately, I think moving the dataProvider out of IsEmail.php would be helpful so it could be re-used when adding tests for sanitize_email(), but I wanted to take this one step at a time.

I'm relatively new to automated testing and very open to suggestions.

Related: #17433, #17491, #21730, #25108, #30039

Attachments (1)

refactor-is-email-tests.diff (3.2 KB) - added by salcode 4 years ago.

Download all attachments as: .zip

Change History (5)

#1 @iseulde
4 years ago

  • Component changed from General to Formatting
  • Version trunk deleted

#2 @miqrogroove
4 years ago

  • Keywords is-email added

#3 @swissspidy
4 years ago

  • Component changed from Formatting to Build/Test Tools
  • Keywords has-patch needs-refresh added

Using data providers makes sense, though separate files are probably not needed for that.

#4 @swissspidy
2 years ago

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