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() {
41
41
* @test
42
42
*/
43
43
public function testCurlTimeoutIsSet () {
44
- $ this ->assertEquals ($ this ->recaptcha ->getCurlTimeout (), 3 );
44
+ $ this ->assertEquals (3 , $ this ->recaptcha ->getCurlTimeout ());
45
45
}
46
46
47
47
/**
@@ -54,6 +54,7 @@ public function testCurlTimeoutIsSet() {
54
54
protected function getEnvironmentSetUp ($ app ) {
55
55
56
56
$ app ['config ' ]->set ('recaptcha.skip_ip ' , '10.0.0.1,10.0.0.2 ' );
57
+ $ app ['config ' ]->set ('recaptcha.curl_timeout ' , 3 );
57
58
}
58
59
59
60
/**
@@ -63,6 +64,6 @@ protected function setUp(): void {
63
64
64
65
parent ::setUp (); // TODO: Change the autogenerated stub
65
66
66
- $ this ->recaptcha = new ReCaptchaBuilderV2 ('api_site_key ' , 'api_secret_key ' , 3 );
67
+ $ this ->recaptcha = new ReCaptchaBuilderV2 ('api_site_key ' , 'api_secret_key ' );
67
68
}
68
69
}
Original file line number Diff line number Diff line change @@ -73,6 +73,9 @@ public function testReCaptchaInvisibleHtmlFormSnippetShouldThrowError() {
73
73
$ this ->recaptcha_invisible ->htmlFormSnippet ();
74
74
}
75
75
76
+ /**
77
+ * @test
78
+ */
76
79
public function testDefaultCurlTimeout () {
77
80
$ this ->assertEquals ($ this ->recaptcha_invisible ->getCurlTimeout (), ReCaptchaBuilder::DEFAULT_CURL_TIMEOUT );
78
81
$ 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() {
87
87
$ this ->assertArrayHasKey ("error-codes " , $ return );
88
88
}
89
89
90
+ /**
91
+ * @test
92
+ */
93
+ public function testCurlTimeoutIsSet () {
94
+ $ this ->assertEquals ($ this ->recaptcha_v3 ->getCurlTimeout (), 3 );
95
+ }
96
+
90
97
/**
91
98
* Define environment setup.
92
99
*
@@ -97,6 +104,7 @@ public function testValidateController() {
97
104
protected function getEnvironmentSetUp ($ app ) {
98
105
99
106
$ app ['config ' ]->set ('recaptcha.version ' , 'v3 ' );
107
+ $ app ['config ' ]->set ('recaptcha.curl_timeout ' , 3 );
100
108
}
101
109
102
110
/**
@@ -106,7 +114,7 @@ protected function setUp(): void {
106
114
107
115
parent ::setUp (); // TODO: Change the autogenerated stub
108
116
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 ' );
110
118
111
119
}
112
120
}
You can’t perform that action at this time.
0 commit comments