Skip to content
Permalink
Browse files

Fix failing tests.

Adding the MIME-Version header caused a few tests to fail.
  • Loading branch information...
markstory committed Oct 12, 2014
1 parent 20ad0e1 commit 77730bbb51921815d1fe24092a04d180d783bf79
Showing with 11 additions and 3 deletions.
  1. +11 −3 cake/tests/cases/libs/controller/components/email.test.php
@@ -551,6 +551,7 @@ function testSendFormats() {
Date: $date
X-Mailer: CakePHP Email Component
Content-Type: {CONTENTTYPE}
MIME-Version: 1.0
Content-Transfer-Encoding: 7bitParameters:
Message:
@@ -608,6 +609,7 @@ function testTemplates() {
Date: $date
X-Mailer: CakePHP Email Component
Content-Type: {CONTENTTYPE}
MIME-Version: 1.0
Content-Transfer-Encoding: 7bitParameters:
Message:
@@ -655,8 +657,14 @@ function testTemplates() {
$boundary = $this->Controller->EmailTest->getBoundary();
$expect = str_replace('{CONTENTTYPE}', 'multipart/alternative; boundary="alt-' . $boundary . '"', $header);
$expect .= '--alt-' . $boundary . "\n" . 'Content-Type: text/plain; charset=UTF-8' . "\n" . 'Content-Transfer-Encoding: 7bit' . "\n\n" . $text . "\n\n";
$expect .= '--alt-' . $boundary . "\n" . 'Content-Type: text/html; charset=UTF-8' . "\n" . 'Content-Transfer-Encoding: 7bit' . "\n\n" . $html . "\n\n";
$expect .= '--alt-' . $boundary . "\n" .
'Content-Type: text/plain; charset=UTF-8' . "\n" .
'Content-Transfer-Encoding: 7bit' .
"\n\n" . $text . "\n\n";
$expect .= '--alt-' . $boundary . "\n" .
'Content-Type: text/html; charset=UTF-8' . "\n" .
'Content-Transfer-Encoding: 7bit' .
"\n\n" . $html . "\n\n";
$expect = '<pre>' . $expect . "--alt-$boundary--" . "\n\n" . '</pre>';
$this->assertEqual($this->Controller->Session->read('Message.email.message'), $this->__osFix($expect));
@@ -692,7 +700,7 @@ function testTemplates() {
$expect = str_replace('{CONTENTTYPE}', 'text/html; charset=UTF-8', $header) . $html;
$expect = '<pre>' . $expect . '</pre>';
$this->assertEqual($this->Controller->Session->read('Message.email.message'), $this->__osFix($expect));
$result = ClassRegistry::getObject('view');
$this->assertFalse($result);
}

0 comments on commit 77730bb

Please sign in to comment.
You can’t perform that action at this time.