Permalink
Browse files

Fix some of the tests to actually test the right classes

  • Loading branch information...
1 parent 06197a1 commit d765473ea767c7fa36463ca97f6129a2818ee36e @CloCkWeRX CloCkWeRX committed Dec 9, 2011
@@ -3,8 +3,8 @@ Bug #10596 Incorrect handling of text and html '0' bodies
--SKIPIF--
--FILE--
<?php
-include("Mail/mime.php");
-$mime = new Mail_mime();
+require_once "Mail/mime.php";
+$mime = new Mail_Mime2();
$mime->setTxtBody('0');
$mime->setHTMLBody('0');
$body = $mime->get();
@@ -5,9 +5,9 @@ Bug #10999 Bad Content-ID(cid) format
<?php
$from='user@from.example.com';
-require_once('Mail/mime.php');
+require_once 'Mail/Mime2.php';
-$mime=new Mail_mime();
+$mime=new Mail_Mime2();
$body='<img src="test.gif"/>';
@@ -3,15 +3,15 @@ Bug #11731 Full stops after soft line breaks are not encoded
--SKIPIF--
--FILE--
<?php
-include("Mail/mime.php");
+require_once "Mail/Mime2.php";
// Second full stop will be at the start of the second line after quoted-printable
// encoding (full stop '=2E' + 72 characters + line-continuation '=' = 76)
$text = '.123456789012345678901234567890123456789012345678901234567890123456789012.3456';
$params = Array(
'content_type' => 'text/plain',
'encoding' => 'quoted-printable',
);
-$mimePart =& new Mail_mimePart($text, $params);
+$mimePart = new Mail_MimePart2($text, $params);
$encoded = $mimePart->encode();
echo $encoded['body'];
@@ -5,9 +5,9 @@ Bug #12385 Bad regex when replacing css style attachments
<?php
$from='user@from.example.com';
-require_once('Mail/mime.php');
+require_once 'Mail/Mime2.php';
-$mime=new Mail_mime();
+$mime=new Mail_Mime2();
$body="<style>
className {
@@ -3,13 +3,13 @@ Bug #12466 Content-Transfer-Encoding checking
--SKIPIF--
--FILE--
<?php
-include("Mail/mime.php");
+require_once "Mail/Mime2.php";
$params = array(
'text_encoding' => '7bit',
'html_encoding' => '7bit',
);
-$mime = new Mail_mime($params);
+$mime = new Mail_Mime($params);
$mime->setTXTBody("ż");
$mime->setHTMLBody("z");
$body = $mime->getMessage();
@@ -3,9 +3,9 @@ Bug #9725 multipart/related & alternative wrong order
--SKIPIF--
--FILE--
<?php
-include("Mail/mime.php");
+require_once "Mail/mime2.php";
-$mime = new Mail_mime();
+$mime = new Mail_Mime2();
$mime->setTXTBody("test");
$mime->setHTMLBody("test");
$mime->addHTMLImage("test", 'application/octet-stream', '', false);
@@ -3,8 +3,8 @@ Bug #14529 basename() workaround
--SKIPIF--
--FILE--
<?php
-include "Mail/mime.php";
-$m = new Mail_mime();
+include "Mail/Mime2.php";
+$m = new Mail_Mime2();
// some text with polish Unicode letter at the beginning
$path = "/path/";
$filename = $path . base64_decode("xZtjaWVtYQ==");
@@ -3,9 +3,9 @@ Bug #14780 Invalid Content-Type when headers() is called before get()
--SKIPIF--
--FILE--
<?php
-include("Mail/mime.php");
+require_once "Mail/Mime2.php";
-$mime = new Mail_mime();
+$mime = new Mail_Mime2();
$mime->setTXTBody("test");
$mime->setHTMLBody("test");
@@ -3,8 +3,8 @@ Bug #16539 Headers longer than 998 characters
--SKIPIF--
--FILE--
<?php
-include("Mail/mime.php");
-$mime = new Mail_mime();
+require_once "Mail/Mime2.php";
+$mime = new Mail_Mime2();
$headers = array(
array('To', 'jskibbie@schawk.com,jskibbie@schawk.com,jskibbie@schawk.com,jskibbie@schawk.com,jskibbie@schawk.com,jskibbie@schawk.com,jskibbie@schawk.com,jskibbie@schawk.com,jskibbie@schawk.com,jskibbie@schawk.com,jskibbie@schawk.com,jskibbie@schawk.com,jskibbie@schawk.com,jskibbie@schawk.com,jskibbie@schawk.com,jskibbie@schawk.com,jskibbie@schawk.com,jskibbie@schawk.com,jskibbie@schawk.com,jskibbie@schawk.com,jskibbie@schawk.com,jskibbie@schawk.com,jskibbie@schawk.com,jskibbie@schawk.com,jskibbie@schawk.com,jskibbie@schawk.com,jskibbie@schawk.com,jskibbie@schawk.com,jskibbie@schawk.com,jskibbie@schawk.com,jskibbie@schawk.com,jskibbie@schawk.com,jskibbie@schawk.com,jskibbie@schawk.com,jskibbie@schawk.com,jskibbie@schawk.com,jskibbie@schawk.com,jskibbie@schawk.com,jskibbie@schawk.com,jskibbie@schawk.com,jskibbie@schawk.com,jskibbie@schawk.com,jskibbie@schawk.com,jskibbie@schawk.com,jskibbie@schawk.com,jskibbie@schawk.com,jskibbie@schawk.com,jskibbie@schawk.com,jskibbie@schawk.com,jskibbie@schawk.com,jskibbie@schawk.com,jskibbie@schawk.com,jskibbie@schawk.com,jskibbie@schawk.com,jskibbie@schawk.com,jskibbie@schawk.com,jskibbie@schawk.com,jskibbie@schawk.com,jskibbie@schawk.com,jskibbie@schawk.com,jskibbie@schawk.com,jskibbie@schawk.com,jskibbie@schawk.com,jskibbie@schawk.com,jskibbie@schawk.com,jskibbie@schawk.com,jskibbie@schawk.com,jskibbie@schawk.com,jskibbie@schawk.com,jskibbie@schawk.com,jskibbie@schawk.com,jskibbie@schawk.com,jskibbie@schawk.com,jskibbie@schawk.com,jskibbie@schawk.com,jskibbie@schawk.com,jskibbie@schawk.com,jskibbie@schawk.com,jskibbie@schawk.com,jskibbie@schawk.com,jskibbie@schawk.com,jskibbie@schawk.com,jskibbie@schawk.com,jskibbie@schawk.com,jskibbie@schawk.com,jskibbie@schawk.com,jskibbie@schawk.com,jskibbie@schawk.com,jskibbie@schawk.com'),
@@ -4,8 +4,8 @@ Bug #3513 Support of RFC2231 in header fields. (ISO-8859-1)
--FILE--
<?php
$test = "Fóóbær.txt";
-require_once('Mail/mime.php');
-$Mime=new Mail_Mime();
+require_once 'Mail/Mime2.php';
+$Mime=new Mail_Mime2();
$Mime->addAttachment('testfile',"text/plain", $test, FALSE, 'base64', 'attachment', 'ISO-8859-1');
$root = $Mime->_addMixedPart();
$enc = $Mime->_addAttachmentPart($root, $Mime->_parts[0]);
@@ -6,8 +6,8 @@ Bug #3513 Support of RFC2231 in header fields. (ISO-2022-JP)
mb_internal_encoding('ISO-2022-JP');
$testEncoded="GyRCRnxLXDhsGyhCLnR4dA==";
$test = base64_decode($testEncoded); // Japanese filename in ISO-2022-JP charset.
-require_once('Mail/mime.php');
-$Mime=new Mail_Mime();
+require_once 'Mail/mime2.php';
+$Mime=new Mail_Mime2();
$Mime->addAttachment('testfile',"text/plain", $test, FALSE, 'base64', 'attachment', 'iso-2022-jp', '');
$root = $Mime->_addMixedPart();
$enc = $Mime->_addAttachmentPart($root, $Mime->_parts[0]);
@@ -4,8 +4,8 @@ Bug #8386 HTML body not correctly encoded if attachments present
--FILE--
<?php
$eol = "\n#";
-include("Mail/mime.php");
-$encoder = new Mail_mime(array('eol'=>$eol));
+require_once "Mail/Mime2.php";
+$encoder = new Mail_Mime2(array('eol'=>$eol));
$encoder->setTXTBody('test');
$encoder->setHTMLBody('<b>test</b>');
$encoder->addAttachment('Just a test', 'application/octet-stream', 'test.txt', false);
@@ -3,9 +3,9 @@ Bug #9558 Broken multiline headers
--SKIPIF--
--FILE--
<?php
-include("Mail/mime.php");
+require_once "Mail/Mime2.php";
-$encoder = new Mail_mime();
+$encoder = new Mail_Mime2();
$input[] = "received by me
at some point
from some server";

0 comments on commit d765473

Please sign in to comment.