Skip to content
This repository was archived by the owner on Jan 30, 2020. It is now read-only.

Commit 4d7550f

Browse files
glenscweierophinney
authored andcommitted
tests: add test with paren in name
1 parent 8aac5f7 commit 4d7550f

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

test/AddressListTest.php

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
*/
2020
class AddressListTest extends TestCase
2121
{
22-
/** @var AddressList $list */
22+
/** @var AddressList */
2323
private $list;
2424

2525
public function setUp()
@@ -95,6 +95,17 @@ public function testCanAddManyAddressesAtOnce()
9595
$this->assertTrue($this->list->has('fw-announce@lists.zend.com'));
9696
}
9797

98+
public function testLosesParensInName()
99+
{
100+
$header = '"Supports (E-mail)" <support@example.org>';
101+
102+
$to = Header\To::fromString('To:' . $header);
103+
$addressList = $to->getAddressList();
104+
$address = $addressList->get('support@example.org');
105+
$this->assertEquals('Supports (E-mail)', $address->getName());
106+
$this->assertEquals('support@example.org', $address->getEmail());
107+
}
108+
98109
public function testDoesNotStoreDuplicatesAndFirstWins()
99110
{
100111
$addresses = [

0 commit comments

Comments
 (0)