Author: Alexandru Stanoi
Date: 2007-05-07 10:22:15 +0200 (Mon, 07 May 2007)
New Revision: 5117

Log:
- Using the message IDs fix as the IDs began to change every day again.

Modified:
   trunk/Mail/tests/transports/transport_imap_test.php
   trunk/Mail/tests/transports/transport_pop3_test.php

Modified: trunk/Mail/tests/transports/transport_imap_test.php
===================================================================
--- trunk/Mail/tests/transports/transport_imap_test.php 2007-05-07 08:21:21 UTC 
(rev 5116)
+++ trunk/Mail/tests/transports/transport_imap_test.php 2007-05-07 08:22:15 UTC 
(rev 5117)
@@ -1489,6 +1489,14 @@
     public static function suite()
     {
         self::$ids = array( 36, 37, 38, 39 );
+        // small hack because the message IDs keep increasing everyday by 4 on 
the server
+        $refDate = mktime( 0, 0, 0, 3, 30, 2007 );
+        $today = mktime( 0, 0, 0, date( 'm' ), date( 'd' ), date( 'y' ) );
+        $days = (int)( ( $today - $refDate ) / ( 24 * 60 * 60 ) );
+        for ( $i = 0; $i < count( self::$ids ); $i++ )
+        {
+            self::$ids[$i] += 4 * $days;
+        }
         return new PHPUnit_Framework_TestSuite( "ezcMailTransportImapTest" );
     }
 }

Modified: trunk/Mail/tests/transports/transport_pop3_test.php
===================================================================
--- trunk/Mail/tests/transports/transport_pop3_test.php 2007-05-07 08:21:21 UTC 
(rev 5116)
+++ trunk/Mail/tests/transports/transport_pop3_test.php 2007-05-07 08:22:15 UTC 
(rev 5117)
@@ -490,7 +490,15 @@
 
     public static function suite()
     {
-        self::$ids = array( '000000244420e93a', '000000254420e93a', 
'000000264420e93a', '000000274420e93a' );
+        self::$ids = array( 36, 37, 38, 39 );
+        // small hack because the message IDs keep increasing everyday by 4 on 
the server
+        $refDate = mktime( 0, 0, 0, 3, 30, 2007 );
+        $today = mktime( 0, 0, 0, date( 'm' ), date( 'd' ), date( 'y' ) );
+        $days = (int)( ( $today - $refDate ) / ( 24 * 60 * 60 ) );
+        for ( $i = 0; $i < count( self::$ids ); $i++ )
+        {
+            self::$ids[$i] = sprintf( "000000%2x4420e93a", self::$ids[$i] + 4 
* $days );
+        }
         return new PHPUnit_Framework_TestSuite( "ezcMailTransportPop3Test" );
     }
 }

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

Reply via email to