forked from ltb-project/self-service-password
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow override of reCAPTCHA request method (cf. issue ltb-project#130)
- Loading branch information
Showing
9 changed files
with
36 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?php | ||
|
||
require_once __DIR__ . '/../lib/vendor/autoload.php'; | ||
|
||
class ReCaptchaTest extends \PHPUnit_Framework_TestCase | ||
{ | ||
/** | ||
* Verifies that alternative request method is available (for $recaptcha_request_method in config) | ||
* @dataProvider requestMethodsProvider | ||
* @param $requestMethod string Request method FQCN | ||
*/ | ||
public function testRequestMethodAvailable($requestMethod) | ||
{ | ||
$this->assertInstanceOf('\ReCaptcha\RequestMethod', new $requestMethod); | ||
} | ||
|
||
public function requestMethodsProvider() | ||
{ | ||
return [ | ||
['\ReCaptcha\RequestMethod\Post'], // default reCAPTCHA request method | ||
['\ReCaptcha\RequestMethod\SocketPost'], | ||
['\ReCaptcha\RequestMethod\CurlPost'], | ||
]; | ||
} | ||
} | ||
|