Skip to content

Commit

Permalink
Update HttpSocketTest.php
Browse files Browse the repository at this point in the history
Update tests.
  • Loading branch information
sarce committed May 30, 2013
1 parent fe774ec commit bf6c385
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/Cake/Test/Case/Network/Http/HttpSocketTest.php
Expand Up @@ -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(
Expand Down Expand Up @@ -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(
Expand Down Expand Up @@ -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'
Expand Down Expand Up @@ -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);
}
Expand Down

0 comments on commit bf6c385

Please sign in to comment.