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: r1093994 - in /incubator/zetacomponents/trunk/Mail/tests/parser: data/pine/uppercase-charset.mail parser_test.php
Date Sat, 16 Apr 2011 13:27:39 GMT
Author: derick
Date: Sat Apr 16 13:27:39 2011
New Revision: 1093994

URL: http://svn.apache.org/viewvc?rev=1093994&view=rev
Log:
- Added the test for #ZETACOMP-75.

Added:
    incubator/zetacomponents/trunk/Mail/tests/parser/data/pine/uppercase-charset.mail
Modified:
    incubator/zetacomponents/trunk/Mail/tests/parser/parser_test.php

Added: incubator/zetacomponents/trunk/Mail/tests/parser/data/pine/uppercase-charset.mail
URL: http://svn.apache.org/viewvc/incubator/zetacomponents/trunk/Mail/tests/parser/data/pine/uppercase-charset.mail?rev=1093994&view=auto
==============================================================================
--- incubator/zetacomponents/trunk/Mail/tests/parser/data/pine/uppercase-charset.mail (added)
+++ incubator/zetacomponents/trunk/Mail/tests/parser/data/pine/uppercase-charset.mail Sat
Apr 16 13:27:39 2011
@@ -0,0 +1,47 @@
+From derick@example.com Wed Mar 30 15:56:27 2011 +0100
+Date: Wed, 30 Mar 2011 15:56:26 +0100 (BST)
+From: Derick Rethans <derick@example.org>
+X-X-Sender: derick@whisky
+To: "HACHE, Louis" <louis.hache@example.com>
+bcc: Derick Rethans <derick@example.org>
+Subject: RE: [xdebug-general] Xdebug & crappy firewall
+In-Reply-To: <13984_1301484192_4D9312A0_13984_430_1_182BB42C807C6E4D8F73FE42714573183990B033F1@DE0-MAILMBX-P13.res.example.corp>
+Message-ID: <alpine.DEB.2.02.1103301259170.27738@whisky>
+References: <32555_1301480572_4D93047C_32555_788_1_182BB42C807C6E4D8F73FE42714573183990B032B9@DE0-MAILMBX-P13.res.example.corp>
<26986_1301481877_4D930995_26986_2307_3_alpine.DEB.2.02.1103301143540.27738@whisky>
+ <13984_1301484192_4D9312A0_13984_430_1_182BB42C807C6E4D8F73FE42714573183990B033F1@DE0-MAILMBX-P13.res.example.corp>
+User-Agent: Alpine 2.02 (DEB 1266 2009-07-14)
+MIME-Version: 1.0
+Content-Type: TEXT/MADEUP; CHARSET=UTF-8
+Status: RO
+X-Status: 
+X-Keywords:                 
+X-UID: 18085
+
+On Wed, 30 Mar 2011, HACHE, Louis wrote:
+
+> On Wed, 20 Mar 2011, Derick Rethans wrote:
+> 
+> > On Wed, 30 Mar 2011, HACHE, Louis wrote:
+> > 
+> > > I'm working on a PHP project with netbeans and xdebug. All is 
+> > > working fine except that there's a crappy firewall which analyses 
+> > > every data transfer on the localhost. Moreover, my computer is 
+> > > really slow. Due to these to things, i can't work, my computer 
+> > > freezes and i have to reboot netbeans and apache.
+> > > 
+> > > Is there a way to configure xdebug in order that he works with a 
+> > > socket and not TCP or UDP or whatever. I want to bypass the 
+> > > firewall.
+> > 
+> > What sort of socket do you mean? You mean unix domain, or Windows 
+> > pipes?
+> 
+That's all right. Everybody makes mistakes :-) I probably could add this 
+to Xdebug quite easily, but the thing is, the protocol specs don't 
+support it (yet) and neither of course will IDEs. If you can get 
+netbeans people willing to commit to adding Windows pipe support as 
+well, then I'll have a look at getting Xdebug to support it.
+
+cheers,
+Derick
+twitter: @derickr and @xdebug

Modified: incubator/zetacomponents/trunk/Mail/tests/parser/parser_test.php
URL: http://svn.apache.org/viewvc/incubator/zetacomponents/trunk/Mail/tests/parser/parser_test.php?rev=1093994&r1=1093993&r2=1093994&view=diff
==============================================================================
--- incubator/zetacomponents/trunk/Mail/tests/parser/parser_test.php (original)
+++ incubator/zetacomponents/trunk/Mail/tests/parser/parser_test.php Sat Apr 16 13:27:39 2011
@@ -524,6 +524,28 @@ class ezcMailParserTest extends ezcTestC
         $this->assertEquals( "This is the body with æøå", $parts[0]->text
);
     }
 
+    public function testAlpineCharset()
+    {
+        $parser = new ezcMailParser();
+        $set = new SingleFileSet( 'pine/uppercase-charset.mail' );
+        $mail = $parser->parseMail( $set );
+        $this->assertEquals( 1, count( $mail ) );
+        $mail = $mail[0];
+        $this->assertEquals( new ezcMailAddress( 'derick@example.org', 'Derick Rethans',
'utf-8' ), $mail->from );
+        $this->assertEquals( array( new ezcMailAddress( 'louis.hache@example.com', 'HACHE,
Louis', 'utf-8' ) ), $mail->to );
+        $this->assertEquals( array( new ezcMailAddress( 'derick@example.org', 'Derick
Rethans', 'utf-8' ) ), $mail->bcc );
+        $this->assertEquals( array(), $mail->cc );
+        $this->assertEquals( 'RE: [xdebug-general] Xdebug & crappy firewall', $mail->subject
);
+        $this->assertEquals( 'utf-8', $mail->subjectCharset );
+        $this->assertEquals( true, $mail->body instanceof ezcMailText );
+        $this->assertEquals( "utf-8", $mail->body->originalCharset );
+        $this->assertEquals( "utf-8", $mail->body->charset );
+        $this->assertEquals( 'madeup', $mail->body->subType );
+
+        $this->assertEquals( 1301496986, $mail->timestamp );
+        $this->assertEquals( 1301496986, strtotime( $mail->getHeader( 'Date' ) ) );
+    }
+
     // 
     // Hotmail
     // 



Mime
View raw message