Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Update HttpSocketTest.php

Update tests.
  • Loading branch information...
commit bf6c3854e5ba089c1d01c9e6d6b6b3743a40b49a 1 parent fe774ec
@sarce sarce authored
Showing with 5 additions and 0 deletions.
  1. +5 −0 lib/Cake/Test/Case/Network/Http/HttpSocketTest.php
View
5 lib/Cake/Test/Case/Network/Http/HttpSocketTest.php
@@ -255,6 +255,7 @@ public function testConfigUri() {
'port' => 23,
'timeout' => 30,
'ssl_verify_peer' => true,
+ 'ssl_allow_self_signed' => false,
'ssl_verify_depth' => 5,
'ssl_verify_host' => true,
'request' => array(
@@ -283,6 +284,7 @@ public function testConfigUri() {
'port' => 80,
'timeout' => 30,
'ssl_verify_peer' => true,
+ 'ssl_allow_self_signed' => false,
'ssl_verify_depth' => 5,
'ssl_verify_host' => true,
'request' => array(
@@ -321,6 +323,7 @@ public function testRequest() {
$context = array(
'ssl' => array(
'verify_peer' => true,
+ 'allow_self_signed' => false,
'verify_depth' => 5,
'CN_match' => 'www.cakephp.org',
'cafile' => CAKE . 'Config' . DS . 'cacert.pem'
@@ -1708,9 +1711,11 @@ public function testConfigContext() {
$this->Socket->reset();
$this->Socket->request('http://example.com');
$this->assertTrue($this->Socket->config['context']['ssl']['verify_peer']);
+ $this->assertFalse($this->Socket->config['context']['ssl']['allow_self_signed']);
$this->assertEquals(5, $this->Socket->config['context']['ssl']['verify_depth']);
$this->assertEquals('example.com', $this->Socket->config['context']['ssl']['CN_match']);
$this->assertArrayNotHasKey('ssl_verify_peer', $this->Socket->config);
+ $this->assertArrayNotHasKey('ssl_allow_self_signed', $this->Socket->config);
$this->assertArrayNotHasKey('ssl_verify_host', $this->Socket->config);
$this->assertArrayNotHasKey('ssl_verify_depth', $this->Socket->config);
}
Please sign in to comment.
Something went wrong with that request. Please try again.