Author: Tobias Schlitt
Date: 2006-09-22 20:57:29 +0200 (Fri, 22 Sep 2006)
New Revision: 3542

Log:
- Add test for ezcMailTools::replyToMail() creation of extended mail class.

Modified:
   trunk/Mail/tests/tools_test.php

Modified: trunk/Mail/tests/tools_test.php
===================================================================
--- trunk/Mail/tests/tools_test.php     2006-09-22 15:37:03 UTC (rev 3541)
+++ trunk/Mail/tests/tools_test.php     2006-09-22 18:57:29 UTC (rev 3542)
@@ -8,7 +8,11 @@
  * @subpackage Tests
  */
 
+class ezcMailExtended extends ezcMail
+{
 
+}
+
 /**
  * @package Mail
  * @subpackage Tests
@@ -163,7 +167,29 @@
         $this->assertEquals( '<[EMAIL PROTECTED]>', $reply->getHeader( 
'In-Reply-To' ) );
         $this->assertEquals( '<[EMAIL PROTECTED]>', $reply->getHeader( 
'References' ) );
     }
+    
+    public function testReplyToExtended()
+    {
+        $parser = new ezcMailParser();
+        $set = new ezcMailFileSet( array( dirname( __FILE__ )
+                                          . 
'/parser/data/kmail/simple_mail_with_text_subject_and_body.mail' ) );
+        $mail = $parser->parseMail( $set );
 
+        $reply = ezcMailTools::replyToMail(
+            $mail[0],
+            new ezcMailAddress( '[EMAIL PROTECTED]', 'Reply Guy' ),
+            ezcMailTools::REPLY_SENDER,
+            "Re: ",
+            "ezcMailExtended"
+        );
+
+        $this->assertType(
+            "ezcMailExtended",
+            $reply,
+            "replyToMaol created incorrect class instance."
+        );
+    }
+
     public function testReplyToAll()
     {
         $parser = new ezcMailParser();

-- 
svn-components mailing list
[email protected]
http://lists.ez.no/mailman/listinfo/svn-components

Reply via email to