[TYPO3-core] FYI72: Bug #15383 :[Unit tests]: Add tests for t3lib_div::validEmail

Christian Kuhn lolli at schwarzbu.ch
Sat Aug 7 03:16:46 CEST 2010


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

Type: Unit test

BT: http://bugs.typo3.org/view.php?id=15383

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.

This patch only applies on-top-of #15832.

Tests have been tested with php 5.2.6 (debian lenny) and php 5.3.2 (self 
compiled).


Regards
Christian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 15383_01.diff
Type: text/x-patch
Size: 3578 bytes
Desc: not available
URL: <http://lists.typo3.org/pipermail/typo3-team-core/attachments/20100807/f27aaa65/attachment.bin>


More information about the TYPO3-team-core mailing list