Author: Derick Rethans Date: 2007-04-12 11:42:41 +0200 (Thu, 12 Apr 2007) New Revision: 4863
Log: - Fixed the content of the test mails back to what it was - we have a cronjob restoring the mailbox. However, the message IDs changed. Modified: trunk/Mail/tests/transports/transport_imap_test.php trunk/Mail/tests/transports/transport_pop3_test.php trunk/Mail/tests/transports/transport_storage_test.php Modified: trunk/Mail/tests/transports/transport_imap_test.php =================================================================== --- trunk/Mail/tests/transports/transport_imap_test.php 2007-04-12 09:33:48 UTC (rev 4862) +++ trunk/Mail/tests/transports/transport_imap_test.php 2007-04-12 09:42:41 UTC (rev 4863) @@ -226,7 +226,7 @@ $imap->authenticate( "ezcomponents", "ezcomponents" ); $imap->selectMailbox( 'inbox' ); $list = $imap->listMessages(); - $this->assertEquals( array( 1 => '1353', 2 => '1549', 3 => '1390', 4 => '63920' ), $list ); + $this->assertEquals( array( 1 => '1542', 2 => '1539', 3 => '1383', 4 => '63913' ), $list ); } public function testListMessagesWithAttachments() @@ -235,7 +235,7 @@ $imap->authenticate( "ezcomponents", "ezcomponents" ); $imap->selectMailbox( 'inbox' ); $list = $imap->listMessages( "multipart/mixed" ); - $this->assertEquals( array( 2 => '1549', 4 => '63920' ), $list ); + $this->assertEquals( array( 1 => '1542', 2 => '1539', 4 => '63913' ), $list ); } public function testFetchByMessageNr1() @@ -340,7 +340,7 @@ $parser = new ezcMailParser(); $mail = $parser->parseMail( $set ); $this->assertEquals( 4, count( $mail ) ); - $this->assertEquals( "pine: Mail with attachment", $mail[3]->subject ); + $this->assertEquals( "pine: Mail with attachment", $mail[1]->subject ); } public function testFetchFromOffset5() @@ -352,7 +352,7 @@ $parser = new ezcMailParser(); $mail = $parser->parseMail( $set ); $this->assertEquals( 4, count( $mail ) ); - $this->assertEquals( "pine: Mail with attachment", $mail[3]->subject ); + $this->assertEquals( "pine: Mail with attachment", $mail[1]->subject ); } public function testStatus() @@ -362,7 +362,7 @@ $imap->selectMailbox( 'inbox' ); $imap->status( $num, $size, $recent, $unseen ); $this->assertEquals( 4, $num ); - $this->assertEquals( 68212, $size ); + $this->assertEquals( 68377, $size ); $this->assertEquals( 0, $recent ); $this->assertEquals( 0, $unseen ); } @@ -461,7 +461,7 @@ $imap->authenticate( "ezcomponents", "ezcomponents" ); $imap->selectMailbox( 'inbox', true ); $list = $imap->listMessages(); - $this->assertEquals( array( 1 => '1353', 2 => '1549', 3 => '1390', 4 => '63920' ), $list ); + $this->assertEquals( array( 1 => '1542', 2 => '1539', 3 => '1383', 4 => '63913' ), $list ); } public function testStatusReadOnly() @@ -471,7 +471,7 @@ $imap->selectMailbox( 'inbox', true ); $imap->status( $num, $size ); $this->assertEquals( 4, $num ); - $this->assertEquals( 68212, $size ); + $this->assertEquals( 68377, $size ); } public function testTopReadOnly() @@ -850,8 +850,8 @@ $parser = new ezcMailParser(); $mail = $parser->parseMail( $set ); $this->assertEquals( 4, count( $mail ) ); - $this->assertEquals( "pine: Simple mail with text subject and body", $mail[0]->subject ); - $this->assertEquals( "pine: test 2 with 8bit norwegian chars", $mail[1]->subject ); + $this->assertEquals( "pine: test 2 with 8bit norwegian chars", $mail[0]->subject ); + $this->assertEquals( "pine: Mail with attachment", $mail[1]->subject ); $this->assertEquals( "pine: test 3 with norwegian chars", $mail[2]->subject ); $this->assertEquals( "pine: Mail with attachment", $mail[3]->subject ); } @@ -920,7 +920,7 @@ $this->assertEquals( "pine: test 2 with 8bit norwegian chars", $mail[2]->subject ); $this->assertEquals( "pine: Mail with attachment", $mail[0]->subject ); $this->assertEquals( "pine: test 3 with norwegian chars", $mail[3]->subject ); - $this->assertEquals( "pine: Simple mail with text subject and body", $mail[1]->subject ); + $this->assertEquals( "pine: Mail with attachment", $mail[1]->subject ); } public function testSortFromOffsetNotSelected() @@ -949,7 +949,7 @@ $this->assertEquals( "pine: test 2 with 8bit norwegian chars", $mail[2]->subject ); $this->assertEquals( "pine: Mail with attachment", $mail[0]->subject ); $this->assertEquals( "pine: test 3 with norwegian chars", $mail[3]->subject ); - $this->assertEquals( "pine: Simple mail with text subject and body", $mail[1]->subject ); + $this->assertEquals( "pine: Mail with attachment", $mail[1]->subject ); } public function testSortFromOffsetBySubjectReverse() @@ -962,7 +962,7 @@ $mail = $parser->parseMail( $set ); $this->assertEquals( 4, count( $mail ) ); $this->assertEquals( "pine: test 2 with 8bit norwegian chars", $mail[1]->subject ); - $this->assertEquals( "pine: Simple mail with text subject and body", $mail[2]->subject ); + $this->assertEquals( "pine: Mail with attachment", $mail[2]->subject ); $this->assertEquals( "pine: test 3 with norwegian chars", $mail[0]->subject ); $this->assertEquals( "pine: Mail with attachment", $mail[3]->subject ); } @@ -977,7 +977,7 @@ $mail = $parser->parseMail( $set ); $this->assertEquals( 4, count( $mail ) ); $this->assertEquals( "pine: test 2 with 8bit norwegian chars", $mail[2]->subject ); - $this->assertEquals( "pine: Simple mail with text subject and body", $mail[0]->subject ); + $this->assertEquals( "pine: Mail with attachment", $mail[0]->subject ); $this->assertEquals( "pine: test 3 with norwegian chars", $mail[3]->subject ); $this->assertEquals( "pine: Mail with attachment", $mail[1]->subject ); } @@ -994,7 +994,7 @@ $this->assertEquals( "pine: test 2 with 8bit norwegian chars", $mail[1]->subject ); $this->assertEquals( "pine: Mail with attachment", $mail[2]->subject ); $this->assertEquals( "pine: test 3 with norwegian chars", $mail[0]->subject ); - $this->assertEquals( "pine: Simple mail with text subject and body", $mail[3]->subject ); + $this->assertEquals( "pine: Mail with attachment", $mail[3]->subject ); } public function testSortMessagesBySubject() @@ -1009,7 +1009,7 @@ $this->assertEquals( "pine: test 2 with 8bit norwegian chars", $mail[2]->subject ); $this->assertEquals( "pine: Mail with attachment", $mail[0]->subject ); $this->assertEquals( "pine: test 3 with norwegian chars", $mail[3]->subject ); - $this->assertEquals( "pine: Simple mail with text subject and body", $mail[1]->subject ); + $this->assertEquals( "pine: Mail with attachment", $mail[1]->subject ); } public function testSortMessagesBySubjectReverse() @@ -1024,7 +1024,7 @@ $this->assertEquals( "pine: test 2 with 8bit norwegian chars", $mail[1]->subject ); $this->assertEquals( "pine: Mail with attachment", $mail[3]->subject ); $this->assertEquals( "pine: test 3 with norwegian chars", $mail[0]->subject ); - $this->assertEquals( "pine: Simple mail with text subject and body", $mail[2]->subject ); + $this->assertEquals( "pine: Mail with attachment", $mail[2]->subject ); } public function testSortMessagesOneElement() @@ -1036,7 +1036,7 @@ $parser = new ezcMailParser(); $mail = $parser->parseMail( $set ); $this->assertEquals( 1, count( $mail ) ); - $this->assertEquals( "pine: Simple mail with text subject and body", $mail[0]->subject ); + $this->assertEquals( "pine: test 2 with 8bit norwegian chars", $mail[0]->subject ); } public function testSortMessagesEmpty() @@ -1315,7 +1315,7 @@ $set = $imap->fetchAll(); $parser = new ezcMailParser(); $mail = $parser->parseMail( $set ); - $expected = array( 1353, '1549', '1390', '63920' ); + $expected = array( 1542, '1539', '1383', '63913' ); for ( $i = 0; $i < count( $mail ); $i++ ) { $this->assertequals( $expected[$i], $mail[$i]->size ); @@ -1413,7 +1413,7 @@ { if ( !ezcBaseFeatures::hasExtensionSupport( 'openssl' ) ) { - $this->markTestSkipped( "No SSL support in PHP." ); + $this->markTestSkipped(); } $imap = new ezcMailImapTransport( "ezctest.ez.no", null, array( 'ssl' => true ) ); $imap->authenticate( "as", "wee123" ); @@ -1429,7 +1429,7 @@ { if ( !ezcBaseFeatures::hasExtensionSupport( 'openssl' ) ) { - $this->markTestSkipped( "No SSL support in PHP." ); + $this->markTestSkipped(); } try { @@ -1456,7 +1456,7 @@ public static function suite() { - self::$ids = array( 20, 21, 22, 23 ); + self::$ids = array( 36, 37, 38, 39 ); return new PHPUnit_Framework_TestSuite( "ezcMailTransportImapTest" ); } } Modified: trunk/Mail/tests/transports/transport_pop3_test.php =================================================================== --- trunk/Mail/tests/transports/transport_pop3_test.php 2007-04-12 09:33:48 UTC (rev 4862) +++ trunk/Mail/tests/transports/transport_pop3_test.php 2007-04-12 09:42:41 UTC (rev 4863) @@ -153,7 +153,7 @@ $pop3 = new ezcMailPop3Transport( "dolly.ez.no" ); $pop3->authenticate( "ezcomponents", "ezcomponents" ); $list = $pop3->listMessages(); - $this->assertEquals( array( 1 => '1353', 2 => '1549', 3 => '1390', 4 => '63920' ), $list ); + $this->assertEquals( array( 1 => '1542', 2 => '1539', 3 => '1383', 4 => '63913' ), $list ); } public function testFetchByMessageNr1() @@ -251,7 +251,7 @@ $parser = new ezcMailParser(); $mail = $parser->parseMail( $set ); $this->assertEquals( 4, count( $mail ) ); - $this->assertEquals( "pine: Mail with attachment", $mail[3]->subject ); + $this->assertEquals( "pine: Mail with attachment", $mail[1]->subject ); } public function testfetchFromOffset5() @@ -262,7 +262,7 @@ $parser = new ezcMailParser(); $mail = $parser->parseMail( $set ); $this->assertEquals( 4, count( $mail ) ); - $this->assertEquals( "pine: Mail with attachment", $mail[3]->subject ); + $this->assertEquals( "pine: Mail with attachment", $mail[1]->subject ); } public function testStatus() @@ -271,7 +271,7 @@ $pop3->authenticate( "ezcomponents", "ezcomponents" ); $pop3->status( $num, $size ); $this->assertEquals( 4, $num ); - $this->assertEquals( 68212, $size ); + $this->assertEquals( 68377, $size ); } public function testTop() @@ -391,10 +391,10 @@ $set = $pop3->fetchAll(); $parser = new ezcMailParser(); $mail = $parser->parseMail( $set ); - $expected = array( 1353, '1549', '1390', '63920' ); + $expected = array( 1542, '1539', '1383', '63913' ); for ( $i = 0; $i < count( $mail ); $i++ ) { - $this->assertEquals( $expected[$i], $mail[$i]->size ); + $this->assertequals( $expected[$i], $mail[$i]->size ); } $parts = $mail[3]->fetchParts(); $this->assertEquals( '45177', $parts[1]->size ); @@ -460,7 +460,7 @@ { if ( !ezcBaseFeatures::hasExtensionSupport( 'openssl' ) ) { - $this->markTestSkipped( "No SSL support in PHP." ); + $this->markTestSkipped(); } $pop3 = new ezcMailPop3Transport( "ezctest.ez.no", null, array( 'ssl' => true ) ); $pop3->authenticate( "as", "wee123" ); @@ -475,7 +475,7 @@ { if ( !ezcBaseFeatures::hasExtensionSupport( 'openssl' ) ) { - $this->markTestSkipped( "No SSL support in PHP." ); + $this->markTestSkipped(); } try { @@ -490,7 +490,7 @@ public static function suite() { - self::$ids = array( '000000144420e93a', '000000154420e93a', '000000164420e93a', '000000174420e93a' ); + self::$ids = array( '000000244420e93a', '000000254420e93a', '000000264420e93a', '000000274420e93a' ); return new PHPUnit_Framework_TestSuite( "ezcMailTransportPop3Test" ); } } Modified: trunk/Mail/tests/transports/transport_storage_test.php =================================================================== --- trunk/Mail/tests/transports/transport_storage_test.php 2007-04-12 09:33:48 UTC (rev 4862) +++ trunk/Mail/tests/transports/transport_storage_test.php 2007-04-12 09:42:41 UTC (rev 4863) @@ -26,7 +26,7 @@ $files = $set->getSourceFiles(); $source = file_get_contents( $files[0] ); - $this->assertEquals( 1353, strlen( $source ) ); + $this->assertEquals( 1542, strlen( $source ) ); } public function testImapMessageSourceFetchAll() @@ -41,7 +41,7 @@ $files = $set->getSourceFiles(); $source = file_get_contents( $files[0] ); - $this->assertEquals( 1353, strlen( $source ) ); + $this->assertEquals( 1542, strlen( $source ) ); } public function testImapMessageSourceEmptySet() @@ -70,7 +70,7 @@ $files = $set->getSourceFiles(); $source = file_get_contents( $files[0] ); - $this->assertEquals( 1353, strlen( $source ) ); + $this->assertEquals( 1542, strlen( $source ) ); } public function testPop3MessageSourceFetchAll() @@ -84,7 +84,7 @@ $files = $set->getSourceFiles(); $source = file_get_contents( $files[0] ); - $this->assertEquals( 1353, strlen( $source ) ); + $this->assertEquals( 1542, strlen( $source ) ); } public function testMboxMessageSource() @@ -198,8 +198,8 @@ $set = new ezcMailStorageSet( $transport->fetchAll(), $this->tempDir ); $mail = $parser->parseMail( $set ); $files = $set->getSourceFiles(); - $expected = array( "[EMAIL PROTECTED]", - "[EMAIL PROTECTED]", + $expected = array( "[EMAIL PROTECTED]", + "[EMAIL PROTECTED]", "[EMAIL PROTECTED]", "[EMAIL PROTECTED]" ); for ( $i = 0; $i < count( $files ); $i++ ) -- svn-components mailing list [EMAIL PROTECTED] http://lists.ez.no/mailman/listinfo/svn-components