public function testMailboxIsRenderedForNameAddress() { $header =
new MailboxListHeader('From',
[new Address('chris@swiftmailer.org', 'Chris Corbyn'
)]);
$this->
assertEquals(['Chris Corbyn <chris@swiftmailer.org>'
],
$header->
getAddressStrings());
} public function testAddressCanBeReturnedForAddress() { $header =
new MailboxListHeader('From',
$addresses =
[new Address('chris@swiftmailer.org'
)]);
$this->
assertEquals($addresses,
$header->
getAddresses());
} public function testQuotesInNameAreQuoted() { $header =
new MailboxListHeader('From',
[new Address('chris@swiftmailer.org', 'Chris Corbyn, "DHE"'
)]);
$this->
assertEquals(['"Chris Corbyn, \"DHE\"" <chris@swiftmailer.org>'
],
$header->
getAddressStrings());
} public function testEscapeCharsInNameAreQuoted() { $header =
new MailboxListHeader('From',
[new Address('chris@swiftmailer.org', 'Chris Corbyn, \\escaped\\'
)]);