Add skip if response is invalid.

This commit is contained in:
mark_story 2012-11-14 21:35:58 -05:00
parent b7e75a6399
commit 9011b42bb4

View file

@ -1714,6 +1714,7 @@ class HttpSocketTest extends CakeTestCase {
$this->markTestSkipped('Found valid certificate, was expecting invalid certificate.');
} catch (SocketException $e) {
$message = $e->getMessage();
$this->skipIf(strpos($message, 'Invalid HTTP'), 'Invalid HTTP Response received, skipping.');
$this->assertContains('Peer certificate CN', $message);
$this->assertContains('Failed to enable crypto', $message);
}