incubator-zeta-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From der...@apache.org
Subject [zeta-commits] svn commit: r1093993 - in /incubator/zetacomponents/trunk/Mail: ChangeLog src/tools.php tests/tools_test.php
Date Sat, 16 Apr 2011 13:26:50 GMT
Author: derick
Date: Sat Apr 16 13:26:49 2011
New Revision: 1093993

URL: http://svn.apache.org/viewvc?rev=1093993&view=rev
Log:
- Fixed #ZETACOMP-76: MailTools::replyTo will always use REPLY_ALL instead of
  distinguishing between REPLY_ALL and REPLY_SENDER.

Modified:
    incubator/zetacomponents/trunk/Mail/ChangeLog
    incubator/zetacomponents/trunk/Mail/src/tools.php
    incubator/zetacomponents/trunk/Mail/tests/tools_test.php

Modified: incubator/zetacomponents/trunk/Mail/ChangeLog
URL: http://svn.apache.org/viewvc/incubator/zetacomponents/trunk/Mail/ChangeLog?rev=1093993&r1=1093992&r2=1093993&view=diff
==============================================================================
--- incubator/zetacomponents/trunk/Mail/ChangeLog (original)
+++ incubator/zetacomponents/trunk/Mail/ChangeLog Sat Apr 16 13:26:49 2011
@@ -10,6 +10,8 @@
   errors in destructor.
 - Fixed #ZETACOMP-75: Mail parser doesn't understand uppercase "CHARSET" that
   alpine uses.
+- Fixed #ZETACOMP-76: MailTools::replyTo will always use REPLY_ALL instead of
+  distinguishing between REPLY_ALL and REPLY_SENDER.
 
 
 1.7 - Monday 21 December 2009

Modified: incubator/zetacomponents/trunk/Mail/src/tools.php
URL: http://svn.apache.org/viewvc/incubator/zetacomponents/trunk/Mail/src/tools.php?rev=1093993&r1=1093992&r2=1093993&view=diff
==============================================================================
--- incubator/zetacomponents/trunk/Mail/src/tools.php (original)
+++ incubator/zetacomponents/trunk/Mail/src/tools.php Sat Apr 16 13:26:49 2011
@@ -42,7 +42,7 @@ class ezcMailTools
     /**
      * Reply to all.
      */
-    const REPLY_ALL = 1;
+    const REPLY_ALL = 2;
 
     /**
      * Server to use for validateEmailAddressMx(). Change this if this server

Modified: incubator/zetacomponents/trunk/Mail/tests/tools_test.php
URL: http://svn.apache.org/viewvc/incubator/zetacomponents/trunk/Mail/tests/tools_test.php?rev=1093993&r1=1093992&r2=1093993&view=diff
==============================================================================
--- incubator/zetacomponents/trunk/Mail/tests/tools_test.php (original)
+++ incubator/zetacomponents/trunk/Mail/tests/tools_test.php Sat Apr 16 13:26:49 2011
@@ -387,6 +387,27 @@ class ezcMailToolsTest extends ezcTestCa
         );
     }
 
+	// test for ZETACOMP-76
+    public function testReplyToSelf()
+    {
+        $parser = new ezcMailParser();
+        $set = new ezcMailFileSet( array( dirname( __FILE__ )
+                                          . '/parser/data/various/multiple_recipients' )
);
+        $mail = $parser->parseMail( $set );
+
+        $reply = ezcMailTools::replyToMail( $mail[0],
+                                            new ezcMailAddress( 'test@example.com', 'Reply
Guy' ),
+                                            ezcMailTools::REPLY_SENDER, 'Antwoord: ' );
+
+        $this->assertEquals( array( new ezcMailAddress( 'fh@ez.no', 'Frederik Holljen',
'utf-8' ) ),
+                             $reply->to );
+        $this->assertEquals( new ezcMailAddress( 'test@example.com', 'Reply Guy' ), $reply->from
);
+        $this->assertEquals( array(), $reply->cc );
+        $this->assertEquals( 'Antwoord: Simple mail with text subject and body', $reply->subject
);
+        $this->assertEquals( '<200602061533.27600.fh@ez.no>', $reply->getHeader(
'In-Reply-To' ) );
+        $this->assertEquals( '<1234.567@example.com> <200602061533.27600.fh@ez.no>',
$reply->getHeader( 'References' ) );
+    }
+
     public function testReplyToAll()
     {
         $parser = new ezcMailParser();



Mime
View raw message