Skip to content

Commit

Permalink
Merge pull request #3609 from php-engineer/master-docblock
Browse files Browse the repository at this point in the history
Correct Docblock
  • Loading branch information
markstory committed Jun 1, 2014
2 parents 6e66815 + 91907b5 commit 3108217
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Cake/Model/ModelValidator.php
Expand Up @@ -544,7 +544,7 @@ public function count() {
* ));
* }}}
*
* @param string $field The name of the field from which the rule will be removed
* @param string $field The name of the field where the rule is to be added
* @param string|array|CakeValidationSet $name name of the rule to be added or list of rules for the field
* @param array|CakeValidationRule $rule or list of rules to be added to the field's rule set
* @return ModelValidator this instance
Expand Down
19 changes: 19 additions & 0 deletions lib/Cake/Test/Case/Network/Http/HttpSocketTest.php
Expand Up @@ -1736,6 +1736,25 @@ 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://tv.eurosport.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 3108217

Please sign in to comment.