Skip to content

Commit

Permalink
Removing peer verification failure test.
Browse files Browse the repository at this point in the history
Since we are not running a domain with an invalid certificate relying on
someone else to do that is quite unreliable.
  • Loading branch information
markstory committed Jun 1, 2014
1 parent e467457 commit 15f63e9
Showing 1 changed file with 0 additions and 19 deletions.
19 changes: 0 additions & 19 deletions lib/Cake/Test/Case/Network/Http/HttpSocketTest.php
Expand Up @@ -1736,25 +1736,6 @@ public function testConfigContext() {
$this->assertArrayNotHasKey('ssl_verify_depth', $this->Socket->config);
}

/**
* Test that requests fail when peer verification fails.
*
* @return void
*/
public function testVerifyPeer() {
$this->skipIf(!extension_loaded('openssl'), 'OpenSSL is not enabled cannot test SSL.');
$socket = new HttpSocket();
try {
$socket->get('https://typography.com');
$this->markTestSkipped('Found valid certificate, was expecting invalid certificate.');
} catch (SocketException $e) {
$message = $e->getMessage();
$this->skipIf(strpos($message, 'Invalid HTTP') !== false, 'Invalid HTTP Response received, skipping.');
$this->assertContains('Peer certificate CN', $message);
$this->assertContains('Failed to enable crypto', $message);
}
}

/**
* Data provider for status codes.
*
Expand Down

0 comments on commit 15f63e9

Please sign in to comment.