Fix tests.
authorJan Schneider <jan@horde.org>
Sun, 6 Sep 2009 16:50:07 +0000 (18:50 +0200)
committerJan Schneider <jan@horde.org>
Sun, 6 Sep 2009 16:50:07 +0000 (18:50 +0200)
framework/Mime/test/Horde/Mime/bug_4834.phpt
framework/Mime/test/Horde/Mime/mail_002.phpt
framework/Mime/test/Horde/Mime/mail_003.phpt
framework/Mime/test/Horde/Mime/mail_004.phpt
framework/Mime/test/Horde/Mime/mail_005.phpt
framework/Mime/test/Horde/Mime/mail_006.phpt
framework/Mime/test/Horde/Mime/mail_007.phpt
framework/Mime/test/Horde/Mime/mail_008.phpt

index 1c3e99d..f9aacb7 100644 (file)
@@ -5,10 +5,11 @@ Bug #4834 Wrong encoding of email lists with groups.
 
 require_once 'Mail/RFC822.php';
 require_once 'Horde/Browser.php';
+require_once 'Horde/Nls.php';
 require_once 'Horde/String.php';
 require dirname(__FILE__) . '/../../../lib/Horde/Mime.php';
 require dirname(__FILE__) . '/../../../lib/Horde/Mime/Address.php';
-echo Horde_Mime::encodeAddress('"John Doe" <john@example.com>, Group: peter@example.com, jane@example.com;');
+echo Horde_Mime::encodeAddress('"John Doe" <john@example.com>, Group: peter@example.com, jane@example.com;', 'us-ascii');
 
 ?>
 --EXPECT--
index bfd43a3..4d4bca4 100644 (file)
@@ -16,7 +16,7 @@ $mail->addHeader('Bcc', 'invisible@example.com');
 $mail->addHeader('From', 'sender@example.com');
 $mail->removeHeader('Cc');
 
-echo $mail->send('dummy');
+echo $mail->send(array('type' => 'dummy'));
 
 ?>
 --EXPECTF--
index 3ede3ed..e65d513 100644 (file)
@@ -12,7 +12,7 @@ $mail = new Horde_Mime_Mail('Sch
                             'Empfänger <recipient@example.com>',
                             'sender@example.com', 'iso-8859-1');
 $mail->addHeader('Cc', 'Der schöne Peter <peter@example.com>', 'iso-8859-15');
-echo $mail->send('dummy');
+echo $mail->send(array('type' => 'dummy'));
 
 ?>
 --EXPECTF--
@@ -28,5 +28,4 @@ MIME-Version: 1.0
 Content-Disposition: inline
 Content-Transfer-Encoding: quoted-printable
 
-H=FCbsche Umlaute
-  und Leerzeichen.
+H=FCbsche Umlaute=0A  und Leerzeichen.=0A
\ No newline at end of file
index 5cd089a..e3c481a 100644 (file)
@@ -15,7 +15,7 @@ $mail->addPart('application/octet-stream',
                file_get_contents(dirname(__FILE__) . '/fixtures/attachment.bin'),
                null, 'attachment');
 
-echo $mail->send('dummy');
+echo $mail->send(array('type' => 'dummy'));
 
 ?>
 --EXPECTF--
@@ -52,5 +52,4 @@ Content-Transfer-Encoding: base64
 
 WnfDtmxmIEJveGvDpG1wZmVyIGphZ2VuIFZpa3RvciBxdWVyIMO8YmVyIGRlbiBncm/Dn2VuIFN5
 bHRlciBEZWljaC4K
-
 --=_%s--
index cb4bbb3..c9fd021 100644 (file)
@@ -12,7 +12,7 @@ require_once 'Horde/Util.php';
 $mail = new Horde_Mime_Mail('My Subject', null, 'recipient@example.com',
                             'sender@example.com');
 $mail->setBody("This is\nthe plain text body.");
-echo $mail->send('dummy');
+echo $mail->send(array('type' => 'dummy'));
 
 echo "====================================================================\n";
 
@@ -20,14 +20,14 @@ $mail = new Horde_Mime_Mail('My Subject', null, 'recipient@example.com',
                             'sender@example.com');
 $mail->setHTMLBody("<h1>Header Title</h1>\n<p>This is<br />the html text body.</p>",
                    'iso-8859-1', false);
-echo $mail->send('dummy');
+echo $mail->send(array('type' => 'dummy'));
 
 echo "====================================================================\n";
 
 $mail = new Horde_Mime_Mail('My Subject', null, 'recipient@example.com',
                             'sender@example.com');
 $mail->setHTMLBody("<h1>Header Title</h1>\n<p>This is<br />the html text body.</p>");
-echo $mail->send('dummy');
+echo $mail->send(array('type' => 'dummy'));
 
 ?>
 --EXPECTF--
index 8f96805..5b2ab11 100644 (file)
@@ -13,7 +13,7 @@ $mail = new Horde_Mime_Mail('My Subject', "This is\nthe body",
 $mail->addAttachment(dirname(__FILE__) . '/fixtures/attachment.bin');
 $mail->addAttachment(dirname(__FILE__) . '/mail_dummy.inc', 'my_name.html', 'text/html', 'iso-8859-15');
 
-echo $mail->send('dummy');
+echo $mail->send(array('type' => 'dummy'));
 
 ?>
 --EXPECTF--
@@ -44,7 +44,6 @@ Content-Transfer-Encoding: base64
 
 WnfDtmxmIEJveGvDpG1wZmVyIGphZ2VuIFZpa3RvciBxdWVyIMO8YmVyIGRlbiBncm/Dn2VuIFN5
 bHRlciBEZWljaC4K
-
 --=_%s
 Content-Type: text/html; charset=iso-8859-15; name=my_name.html
 Content-Disposition: attachment; filename=my_name.html
index b5d16ae..efade0a 100644 (file)
@@ -17,7 +17,7 @@ preg_match('/^Message-ID: (.*)$/m', $raw, $id1);
 echo "====================================================================\n";
 
 $mail->addHeader('To', 'Änderung <other@example.com>', 'utf-8');
-$raw = $mail->send('dummy');
+$raw = $mail->send(array('type' => 'dummy'));
 echo $raw;
 preg_match('/^Message-ID: (.*)$/m', $raw, $id2);
 
@@ -43,14 +43,14 @@ the body
 ====================================================================
 Subject: My Subject
 From: sender@example.com
-Message-ID: <%d.%s@mail.example.com>
 User-Agent: Horde Application Framework 4.0
-Date: %s, %d %s %d %d:%d:%d %s%d
 Content-Type: text/plain; charset=iso-8859-15; format=flowed; DelSp=Yes
 MIME-Version: 1.0
 Content-Disposition: inline
 Content-Transfer-Encoding: 7bit
 To: =?utf-8?b?w4RuZGVydW5n?= <other@example.com>
+Message-ID: <%d.%s@mail.example.com>
+Date: %s, %d %s %d %d:%d:%d %s%d
 
 This is
 the body
index 02e72b5..2d7452b 100644 (file)
@@ -14,7 +14,7 @@ $mail->setBody('Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do
 consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
 cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.');
 
-echo $mail->send('dummy');
+echo $mail->send(array('type' => 'dummy'));
 
 ?>
 --EXPECTF--