[ Index ] |
PHP Cross Reference of Phabricator |
[Summary view] [Print] [Text view]
1 <?php 2 3 final class PhabricatorMailReceiverTestCase extends PhabricatorTestCase { 4 5 public function testAddressSimilarity() { 6 $env = PhabricatorEnv::beginScopedEnv(); 7 $env->overrideEnvConfig('metamta.single-reply-handler-prefix', 'prefix'); 8 9 $base = '[email protected]'; 10 11 $same = array( 12 '[email protected]', 13 '"Abrahamn Lincoln" <[email protected]>', 14 '[email protected]', 15 '[email protected]', 16 ); 17 18 foreach ($same as $address) { 19 $this->assertTrue( 20 PhabricatorMailReceiver::matchAddresses($base, $address), 21 "Address {$address}"); 22 } 23 24 $diff = array( 25 '[email protected]', 26 '[email protected]', 27 '[email protected]', 28 '[email protected]', 29 '[email protected]', 30 '[email protected]', 31 ); 32 33 foreach ($diff as $address) { 34 $this->assertFalse( 35 PhabricatorMailReceiver::matchAddresses($base, $address), 36 "Address: {$address}"); 37 } 38 } 39 40 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Sun Nov 30 09:20:46 2014 | Cross-referenced by PHPXref 0.7.1 |