Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixing test cases for EmailComponent

  • Loading branch information...
commit 156a708423e44f7cdbbcc0fc4ac44767a43ba8f3 1 parent d91f7c2
@ADmad ADmad authored
Showing with 3 additions and 3 deletions.
  1. +3 −3 cake/tests/cases/libs/controller/components/email.test.php
View
6 cake/tests/cases/libs/controller/components/email.test.php
@@ -516,7 +516,7 @@ function testSendDebug() {
$this->assertPattern('/Subject: Cake Debug Test\n/', $result);
$this->assertPattern('/Reply-To: noreply@example.com\n/', $result);
$this->assertPattern('/From: noreply@example.com\n/', $result);
- $this->assertPattern('/Date: ' . date(DATE_RFC2822) . '\n/', $result);
+ $this->assertPattern('/Date: ' . preg_quote(date(DATE_RFC2822)) . '\n/', $result);
$this->assertPattern('/X-Mailer: CakePHP Email Component\n/', $result);
$this->assertPattern('/Content-Type: text\/plain; charset=UTF-8\n/', $result);
$this->assertPattern('/Content-Transfer-Encoding: 7bitParameters:\n/', $result);
@@ -759,10 +759,10 @@ function testFormatAddressAliases() {
$result = $this->Controller->EmailTest->formatAddress('email@example.com', true);
$this->assertEqual($result, '<email@example.com>');
-
+
$result = $this->Controller->EmailTest->formatAddress('<email@example.com>', true);
$this->assertEqual($result, '<email@example.com>');
-
+
$result = $this->Controller->EmailTest->formatAddress('alias name <email@example.com>', true);
$this->assertEqual($result, '<email@example.com>');
}
Please sign in to comment.
Something went wrong with that request. Please try again.