Opened 10 years ago
Last modified 7 weeks ago
#31313 new enhancement
refactor is_email() tests to use separate data files and PHPUnit dataProvider
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Future Release | Priority: | normal |
Severity: | normal | Version: | |
Component: | Build/Test Tools | Keywords: | is-email has-patch has-unit-tests |
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.
Attachments (1)
Change History (7)
#3
@
10 years ago
- Component changed from Formatting to Build/Test Tools
- Keywords has-patch needs-refresh added
This ticket was mentioned in PR #8451 on WordPress/wordpress-develop by @geekofshire.
7 weeks ago
#5
- Keywords has-unit-tests added; needs-refresh removed
This PR updates the is_email()
tests to improve structure and maintainability by utilizing PHPUnit's dataProvider
Trac ticket: https://core.trac.wordpress.org/ticket/31313
#6
@
7 weeks ago
Hey everyone,
I noticed that this ticket has been open for quite a while, and I wanted to help move it forward. I've refactored the is_email() tests to use dataProvider while keeping all test data in the same file for better maintainability. Let me know if there’s any feedback or if anything else needs to be updated!
Thanks!
Using data providers makes sense, though separate files are probably not needed for that.