From 983fd5e6e7ecb2199fe8a3ea39e1e82558c89252 Mon Sep 17 00:00:00 2001 From: Marvin Feldmann Date: Tue, 26 Apr 2016 17:20:28 +0200 Subject: [PATCH] Add tests for adressess with UTF-8 characters --- test/EmailAddressTest.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/test/EmailAddressTest.php b/test/EmailAddressTest.php index 615b83f0e..e5917c594 100644 --- a/test/EmailAddressTest.php +++ b/test/EmailAddressTest.php @@ -220,7 +220,7 @@ public function testEmailDisplay() public function validEmailAddresses() { // @codingStandardsIgnoreStart - return [ + $return = [ 'bob@domain.com' => ['bob@domain.com'], 'bob.jones@domain.co.uk' => ['bob.jones@domain.co.uk'], 'bob.jones.smythe@domain.co.uk' => ['bob.jones.smythe@domain.co.uk'], @@ -232,6 +232,13 @@ public function validEmailAddresses() 'bob@verylongdomainsupercalifragilisticexpialidociousspoonfulofsugar.com' => ['bob@verylongdomainsupercalifragilisticexpialidociousspoonfulofsugar.com'], "B.O'Callaghan@domain.com" => ["B.O'Callaghan@domain.com"], ]; + + if (extension_loaded('intl')) { + $return['bob@موقع.إختبار'] = ['bob@موقع.إختبار']; + $return['bob@xn--4gbrim.xn--kgbechtv'] = ['bob@xn--4gbrim.xn--kgbechtv']; + } + + return $return; // @codingStandardsIgnoreEnd } @@ -269,6 +276,7 @@ public function invalidEmailAddresses() 'bob @ domain.com' => ['bob @ domain.com'], 'Abc..123@example.com' => ['Abc..123@example.com'], '"bob%jones@domain.com' => ['"bob%jones@domain.com'], + 'иван@письмо.рф' => ['иван@письмо.рф'], 'multiline' => ['bob @domain.com'],