Permalink
Browse files

Add coverage for comma in email alias.

Closes #2381
  • Loading branch information...
markstory committed Nov 22, 2013
1 parent 37e387f commit d97cf79545b6fedf84de84a3f9f26f9e31a073d1
Showing with 3 additions and 3 deletions.
  1. +3 −3 lib/Cake/Test/Case/Network/Email/CakeEmailTest.php
@@ -448,7 +448,7 @@ public function testAddresses() {
$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 @@ public function testAddresses() {
$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 @@ public function testAddresses() {
$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>');
}

0 comments on commit d97cf79

Please sign in to comment.