Skip to content

Commit

Permalink
Attempt to make tests pass when OpenSSL is not enabled.
Browse files Browse the repository at this point in the history
  • Loading branch information
markstory committed Sep 21, 2012
1 parent aaefbf1 commit 268e589
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions lib/Cake/Test/Case/Network/CakeSocketTest.php
Expand Up @@ -204,11 +204,11 @@ public function testLastError() {
*/
public function testReset() {
$config = array(
'persistent' => true,
'host' => '127.0.0.1',
'protocol' => 'udp',
'port' => 80,
'timeout' => 20
'persistent' => true,
'host' => '127.0.0.1',
'protocol' => 'udp',
'port' => 80,
'timeout' => 20
);
$anotherSocket = new CakeSocket($config);
$anotherSocket->reset();
Expand All @@ -222,6 +222,7 @@ public function testReset() {
* @return void
*/
public function testEnableCryptoSocketExceptionNoSsl() {
$this->skipIf(!extension_loaded('openssl'), 'OpenSSL is not enabled cannot test SSL.');
$configNoSslOrTls = array('host' => 'localhost', 'port' => 80, 'timeout' => 0.1);

// testing exception on no ssl socket server for ssl and tls methods
Expand Down Expand Up @@ -251,6 +252,7 @@ public function testEnableCryptoSocketExceptionNoTls() {
* @return void
*/
protected function _connectSocketToSslTls() {
$this->skipIf(!extension_loaded('openssl'), 'OpenSSL is not enabled cannot test SSL.');
$configSslTls = array('host' => 'smtp.gmail.com', 'port' => 465, 'timeout' => 5);
$this->Socket = new CakeSocket($configSslTls);
$this->Socket->connect();
Expand Down

0 comments on commit 268e589

Please sign in to comment.