Skip to content
This repository
Browse code

Attempt to make tests pass when OpenSSL is not enabled.

  • Loading branch information...
commit 268e58956d6fd14067f9e7665d9fafce36173fa6 1 parent aaefbf1
Mark Story authored September 20, 2012
12  lib/Cake/Test/Case/Network/CakeSocketTest.php
@@ -204,11 +204,11 @@ public function testLastError() {
204 204
  */
205 205
 	public function testReset() {
206 206
 		$config = array(
207  
-			'persistent'	=> true,
208  
-			'host'			=> '127.0.0.1',
209  
-			'protocol'		=> 'udp',
210  
-			'port'			=> 80,
211  
-			'timeout'		=> 20
  207
+			'persistent' => true,
  208
+			'host' => '127.0.0.1',
  209
+			'protocol' => 'udp',
  210
+			'port' => 80,
  211
+			'timeout' => 20
212 212
 		);
213 213
 		$anotherSocket = new CakeSocket($config);
214 214
 		$anotherSocket->reset();
@@ -222,6 +222,7 @@ public function testReset() {
222 222
  * @return void
223 223
  */
224 224
 	public function testEnableCryptoSocketExceptionNoSsl() {
  225
+		$this->skipIf(!extension_loaded('openssl'), 'OpenSSL is not enabled cannot test SSL.');
225 226
 		$configNoSslOrTls = array('host' => 'localhost', 'port' => 80, 'timeout' => 0.1);
226 227
 
227 228
 		// testing exception on no ssl socket server for ssl and tls methods
@@ -251,6 +252,7 @@ public function testEnableCryptoSocketExceptionNoTls() {
251 252
  * @return void
252 253
  */
253 254
 	protected function _connectSocketToSslTls() {
  255
+		$this->skipIf(!extension_loaded('openssl'), 'OpenSSL is not enabled cannot test SSL.');
254 256
 		$configSslTls = array('host' => 'smtp.gmail.com', 'port' => 465, 'timeout' => 5);
255 257
 		$this->Socket = new CakeSocket($configSslTls);
256 258
 		$this->Socket->connect();

0 notes on commit 268e589

Please sign in to comment.
Something went wrong with that request. Please try again.