mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-19 02:56:15 +00:00
Attempt to make tests pass when OpenSSL is not enabled.
This commit is contained in:
parent
aaefbf1c2f
commit
268e58956d
1 changed files with 7 additions and 5 deletions
|
@ -204,11 +204,11 @@ class CakeSocketTest extends CakeTestCase {
|
||||||
*/
|
*/
|
||||||
public function testReset() {
|
public function testReset() {
|
||||||
$config = array(
|
$config = array(
|
||||||
'persistent' => true,
|
'persistent' => true,
|
||||||
'host' => '127.0.0.1',
|
'host' => '127.0.0.1',
|
||||||
'protocol' => 'udp',
|
'protocol' => 'udp',
|
||||||
'port' => 80,
|
'port' => 80,
|
||||||
'timeout' => 20
|
'timeout' => 20
|
||||||
);
|
);
|
||||||
$anotherSocket = new CakeSocket($config);
|
$anotherSocket = new CakeSocket($config);
|
||||||
$anotherSocket->reset();
|
$anotherSocket->reset();
|
||||||
|
@ -222,6 +222,7 @@ class CakeSocketTest extends CakeTestCase {
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function testEnableCryptoSocketExceptionNoSsl() {
|
public function testEnableCryptoSocketExceptionNoSsl() {
|
||||||
|
$this->skipIf(!extension_loaded('openssl'), 'OpenSSL is not enabled cannot test SSL.');
|
||||||
$configNoSslOrTls = array('host' => 'localhost', 'port' => 80, 'timeout' => 0.1);
|
$configNoSslOrTls = array('host' => 'localhost', 'port' => 80, 'timeout' => 0.1);
|
||||||
|
|
||||||
// testing exception on no ssl socket server for ssl and tls methods
|
// testing exception on no ssl socket server for ssl and tls methods
|
||||||
|
@ -251,6 +252,7 @@ class CakeSocketTest extends CakeTestCase {
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
protected function _connectSocketToSslTls() {
|
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);
|
$configSslTls = array('host' => 'smtp.gmail.com', 'port' => 465, 'timeout' => 5);
|
||||||
$this->Socket = new CakeSocket($configSslTls);
|
$this->Socket = new CakeSocket($configSslTls);
|
||||||
$this->Socket->connect();
|
$this->Socket->connect();
|
||||||
|
|
Loading…
Add table
Reference in a new issue