/usr/share/php/tests/Horde_Mail/Horde/Mail/AddressTest.php is in php-horde-mail 2.1.4-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 | <?php
/**
* @author Michael Slusarz <slusarz@horde.org>
* @category Horde
* @license http://www.horde.org/licenses/bsd BSD
* @package Mail
* @subpackage UnitTests
*/
class Horde_Mail_AddressTest extends PHPUnit_Framework_TestCase
{
public function testDomainMatch()
{
$address = new Horde_Mail_Rfc822_Address('Test <test@example.com>');
$this->assertTrue($address->matchDomain('example.com'));
$this->assertFalse($address->matchDomain('foo.example.com'));
$address2 = new Horde_Mail_Rfc822_Address('Test <test@foo.example.com>');
$this->assertTrue($address2->matchDomain('example.com'));
$this->assertTrue($address2->matchDomain('foo.example.com'));
$address3 = new Horde_Mail_Rfc822_Address('Test <test@example.co.uk>');
$this->assertTrue($address3->matchDomain('example.co.uk'));
$this->assertFalse($address3->matchDomain('foo.example.co.uk'));
$this->assertTrue($address3->matchDomain('co.uk'));
$address4 = new Horde_Mail_Rfc822_Address('Test <test@foo.example.co.uk>');
$this->assertTrue($address4->matchDomain('example.co.uk'));
$this->assertTrue($address4->matchDomain('foo.example.co.uk'));
$this->assertTrue($address4->matchDomain('co.uk'));
}
public function testPersonalIsSameAsEmail()
{
$address = new Horde_Mail_Rfc822_Address('"test@example.com" <test@example.com>');
$this->assertEquals(
'test@example.com',
strval($address)
);
$address = new Horde_Mail_Rfc822_Address('"TEST@EXAMPLE.COM" <test@example.com>');
$this->assertEquals(
'test@example.com',
strval($address)
);
}
}
|