This repository was archived by the owner on Jun 10, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +15
-3
lines changed
Expand file tree Collapse file tree 3 files changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ public function testSkipIpWhiteListIsArray() {
4141 * @test
4242 */
4343 public function testCurlTimeoutIsSet () {
44- $ this ->assertEquals ($ this ->recaptcha ->getCurlTimeout (), 3 );
44+ $ this ->assertEquals (3 , $ this ->recaptcha ->getCurlTimeout ());
4545 }
4646
4747 /**
@@ -54,6 +54,7 @@ public function testCurlTimeoutIsSet() {
5454 protected function getEnvironmentSetUp ($ app ) {
5555
5656 $ app ['config ' ]->set ('recaptcha.skip_ip ' , '10.0.0.1,10.0.0.2 ' );
57+ $ app ['config ' ]->set ('recaptcha.curl_timeout ' , 3 );
5758 }
5859
5960 /**
@@ -63,6 +64,6 @@ protected function setUp(): void {
6364
6465 parent ::setUp (); // TODO: Change the autogenerated stub
6566
66- $ this ->recaptcha = new ReCaptchaBuilderV2 ('api_site_key ' , 'api_secret_key ' , 3 );
67+ $ this ->recaptcha = new ReCaptchaBuilderV2 ('api_site_key ' , 'api_secret_key ' );
6768 }
6869}
Original file line number Diff line number Diff line change @@ -73,6 +73,9 @@ public function testReCaptchaInvisibleHtmlFormSnippetShouldThrowError() {
7373 $ this ->recaptcha_invisible ->htmlFormSnippet ();
7474 }
7575
76+ /**
77+ * @test
78+ */
7679 public function testDefaultCurlTimeout () {
7780 $ this ->assertEquals ($ this ->recaptcha_invisible ->getCurlTimeout (), ReCaptchaBuilder::DEFAULT_CURL_TIMEOUT );
7881 $ this ->assertEquals ($ this ->recaptcha_v2 ->getCurlTimeout (), ReCaptchaBuilder::DEFAULT_CURL_TIMEOUT );
Original file line number Diff line number Diff line change @@ -87,6 +87,13 @@ public function testValidateController() {
8787 $ this ->assertArrayHasKey ("error-codes " , $ return );
8888 }
8989
90+ /**
91+ * @test
92+ */
93+ public function testCurlTimeoutIsSet () {
94+ $ this ->assertEquals ($ this ->recaptcha_v3 ->getCurlTimeout (), 3 );
95+ }
96+
9097 /**
9198 * Define environment setup.
9299 *
@@ -97,6 +104,7 @@ public function testValidateController() {
97104 protected function getEnvironmentSetUp ($ app ) {
98105
99106 $ app ['config ' ]->set ('recaptcha.version ' , 'v3 ' );
107+ $ app ['config ' ]->set ('recaptcha.curl_timeout ' , 3 );
100108 }
101109
102110 /**
@@ -106,7 +114,7 @@ protected function setUp(): void {
106114
107115 parent ::setUp (); // TODO: Change the autogenerated stub
108116
109- $ this ->recaptcha_v3 = new ReCaptchaBuilderV3 ('api_site_key ' , 'api_secret_key ' , 3 );
117+ $ this ->recaptcha_v3 = new ReCaptchaBuilderV3 ('api_site_key ' , 'api_secret_key ' );
110118
111119 }
112120}
You can’t perform that action at this time.
0 commit comments