Author: Alexandru Stanoi Date: 2007-01-31 16:16:25 +0100 (Wed, 31 Jan 2007) New Revision: 4606
Log: - Skip the SSL tests if the openssl extension is not installed (as it is an optional extension). Modified: trunk/Mail/tests/transports/transport_imap_test.php trunk/Mail/tests/transports/transport_pop3_test.php trunk/Mail/tests/transports/transport_smtp_test.php Modified: trunk/Mail/tests/transports/transport_imap_test.php =================================================================== --- trunk/Mail/tests/transports/transport_imap_test.php 2007-01-31 15:01:35 UTC (rev 4605) +++ trunk/Mail/tests/transports/transport_imap_test.php 2007-01-31 15:16:25 UTC (rev 4606) @@ -1406,6 +1406,10 @@ public function testServerSSL() { + if ( !ezcBaseFeatures::hasExtensionSupport( 'openssl' ) ) + { + $this->markTestSkipped(); + } $imap = new ezcMailImapTransport( "ezctest.ez.no", null, array( 'ssl' => true ) ); $imap->authenticate( "as", "wee123" ); $imap->selectMailbox( 'inbox' ); @@ -1418,6 +1422,10 @@ public function testServerSSLInvalidPort() { + if ( !ezcBaseFeatures::hasExtensionSupport( 'openssl' ) ) + { + $this->markTestSkipped(); + } try { $imap = new ezcMailImapTransport( "ezctest.ez.no", 143, array( 'ssl' => true ) ); Modified: trunk/Mail/tests/transports/transport_pop3_test.php =================================================================== --- trunk/Mail/tests/transports/transport_pop3_test.php 2007-01-31 15:01:35 UTC (rev 4605) +++ trunk/Mail/tests/transports/transport_pop3_test.php 2007-01-31 15:16:25 UTC (rev 4606) @@ -445,6 +445,10 @@ public function testServerSSL() { + if ( !ezcBaseFeatures::hasExtensionSupport( 'openssl' ) ) + { + $this->markTestSkipped(); + } $pop3 = new ezcMailPop3Transport( "ezctest.ez.no", null, array( 'ssl' => true ) ); $pop3->authenticate( "as", "wee123" ); $set = $pop3->fetchAll(); @@ -456,6 +460,10 @@ public function testServerSSLInvalidPort() { + if ( !ezcBaseFeatures::hasExtensionSupport( 'openssl' ) ) + { + $this->markTestSkipped(); + } try { $pop3 = new ezcMailPop3Transport( "ezctest.ez.no", 110, array( 'ssl' => true ) ); Modified: trunk/Mail/tests/transports/transport_smtp_test.php =================================================================== --- trunk/Mail/tests/transports/transport_smtp_test.php 2007-01-31 15:01:35 UTC (rev 4605) +++ trunk/Mail/tests/transports/transport_smtp_test.php 2007-01-31 15:16:25 UTC (rev 4606) @@ -273,6 +273,10 @@ public function testConnectionSSL() { + if ( !ezcBaseFeatures::hasExtensionSupport( 'openssl' ) ) + { + $this->markTestSkipped(); + } try { $smtp = new ezcMailSmtpTransport( 'ezctest.ez.no', '', '', null, array( 'connectionType' => ezcMailSmtpTransport::CONNECTION_SSL ) ); @@ -292,6 +296,10 @@ public function testConnectionSSLOptions() { + if ( !ezcBaseFeatures::hasExtensionSupport( 'openssl' ) ) + { + $this->markTestSkipped(); + } try { $smtp = new ezcMailSmtpTransport( 'ezctest.ez.no', '', '', 465, @@ -313,6 +321,10 @@ public function testConnectionSSLv2() { + if ( !ezcBaseFeatures::hasExtensionSupport( 'openssl' ) ) + { + $this->markTestSkipped(); + } try { $smtp = new ezcMailSmtpTransport( 'ezctest.ez.no', '', '', null, array( 'connectionType' => ezcMailSmtpTransport::CONNECTION_SSLV2 ) ); @@ -332,6 +344,10 @@ public function testConnectionSSLv3() { + if ( !ezcBaseFeatures::hasExtensionSupport( 'openssl' ) ) + { + $this->markTestSkipped(); + } try { $smtp = new ezcMailSmtpTransport( 'ezctest.ez.no', '', '', 465, array( 'connectionType' => ezcMailSmtpTransport::CONNECTION_SSLV3 ) ); @@ -351,6 +367,10 @@ public function testConnectionTLS() { + if ( !ezcBaseFeatures::hasExtensionSupport( 'openssl' ) ) + { + $this->markTestSkipped(); + } try { $smtp = new ezcMailSmtpTransport( 'ezctest.ez.no', '', '', null, array( 'connectionType' => ezcMailSmtpTransport::CONNECTION_TLS ) ); @@ -370,6 +390,10 @@ public function testConnectionTLSWrongPort() { + if ( !ezcBaseFeatures::hasExtensionSupport( 'openssl' ) ) + { + $this->markTestSkipped(); + } try { $smtp = new ezcMailSmtpTransport( 'ezctest.ez.no', '', '', 25, array( 'connectionType' => ezcMailSmtpTransport::CONNECTION_TLS ) ); @@ -384,7 +408,6 @@ } catch ( ezcMailTransportException $e ) { - } } @@ -396,7 +419,7 @@ $mail = new ezcMail(); $mail->from = new ezcMailAddress( '[EMAIL PROTECTED]', 'From' ); $mail->addTo( new ezcMailAddress( '[EMAIL PROTECTED]', 'To' ) ); - $mail->subject = "SMTP TLS test"; + $mail->subject = "SMTP plain test"; $mail->body = new ezcMailText( "It doesn't look as if it's ever used." ); $mail->generate(); $smtp->send( $mail ); -- svn-components mailing list svn-components@lists.ez.no http://lists.ez.no/mailman/listinfo/svn-components