Add coverage for comma in email alias.

Closes #2381
This commit is contained in:
mark_story 2013-11-22 13:14:21 -05:00
parent 37e387fed2
commit d97cf79545

View file

@ -448,7 +448,7 @@ class CakeEmailTest extends CakeTestCase {
$this->CakeEmail->replyTo('replyto@cakephp.org', 'ReplyTo CakePHP');
$this->CakeEmail->readReceipt('readreceipt@cakephp.org', 'ReadReceipt CakePHP');
$this->CakeEmail->returnPath('returnpath@cakephp.org', 'ReturnPath CakePHP');
$this->CakeEmail->to('to@cakephp.org', 'To CakePHP');
$this->CakeEmail->to('to@cakephp.org', 'To, CakePHP');
$this->CakeEmail->cc('cc@cakephp.org', 'Cc CakePHP');
$this->CakeEmail->bcc('bcc@cakephp.org', 'Bcc CakePHP');
$this->CakeEmail->addTo('to2@cakephp.org', 'To2 CakePHP');
@ -459,7 +459,7 @@ class CakeEmailTest extends CakeTestCase {
$this->assertSame($this->CakeEmail->replyTo(), array('replyto@cakephp.org' => 'ReplyTo CakePHP'));
$this->assertSame($this->CakeEmail->readReceipt(), array('readreceipt@cakephp.org' => 'ReadReceipt CakePHP'));
$this->assertSame($this->CakeEmail->returnPath(), array('returnpath@cakephp.org' => 'ReturnPath CakePHP'));
$this->assertSame($this->CakeEmail->to(), array('to@cakephp.org' => 'To CakePHP', 'to2@cakephp.org' => 'To2 CakePHP'));
$this->assertSame($this->CakeEmail->to(), array('to@cakephp.org' => 'To, CakePHP', 'to2@cakephp.org' => 'To2 CakePHP'));
$this->assertSame($this->CakeEmail->cc(), array('cc@cakephp.org' => 'Cc CakePHP', 'cc2@cakephp.org' => 'Cc2 CakePHP'));
$this->assertSame($this->CakeEmail->bcc(), array('bcc@cakephp.org' => 'Bcc CakePHP', 'bcc2@cakephp.org' => 'Bcc2 CakePHP'));
@ -468,7 +468,7 @@ class CakeEmailTest extends CakeTestCase {
$this->assertSame($headers['Reply-To'], 'ReplyTo CakePHP <replyto@cakephp.org>');
$this->assertSame($headers['Disposition-Notification-To'], 'ReadReceipt CakePHP <readreceipt@cakephp.org>');
$this->assertSame($headers['Return-Path'], 'ReturnPath CakePHP <returnpath@cakephp.org>');
$this->assertSame($headers['To'], 'To CakePHP <to@cakephp.org>, To2 CakePHP <to2@cakephp.org>');
$this->assertSame($headers['To'], '"To, CakePHP" <to@cakephp.org>, To2 CakePHP <to2@cakephp.org>');
$this->assertSame($headers['Cc'], 'Cc CakePHP <cc@cakephp.org>, Cc2 CakePHP <cc2@cakephp.org>');
$this->assertSame($headers['Bcc'], 'Bcc CakePHP <bcc@cakephp.org>, Bcc2 CakePHP <bcc2@cakephp.org>');
}