Issue Bug Closed

#21649[Unit tests]: Add tests for t3lib_div::validEmail

Christian Kuhn 08/07/10, 03:09 updated 10/02/18, 12:24

Description

The following patch will be committed in 72 hours if nobody objects.

Type: Unit test

BT:

Branches: 4.4, trunk

Problem:
It’s unclear which subsets of according RFC’s for valid / invalid email addresses are actually implemented by t3lib_div::validEmail().

Solution:
Add unit tests with edge cases to show what is actually reported as valid / invalid.

Notes:
Most tests are a rip off from php’s unit tests for filter_var “FILTER_VALIDATE_EMAIL”, but some are currently uncommented because php behaviour changed between minor and major versions. Those commented tests can put into action as soon as TYPO3’s php version requirements raised and php settled in this regard, or if an own solution instead of php filters is implemented.

(issue imported from #M15383)

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.