We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 04c2d25 commit 411c333Copy full SHA for 411c333
README.md
@@ -63,7 +63,7 @@ public function rules()
63
For tests
64
---------
65
66
-Use key ```RECAPTCHA_OFF``` in ```index-test.php``` for disable recaptcha's validate:
+When use ```YII_ENV_TEST``` in ```index-test.php``` then disabled recaptcha's validate:
67
```php
68
-define('RECAPTCHA_OFF', true);
+defined('YII_ENV') or define('YII_ENV', 'test');
69
```
src/ReCaptcha.php
@@ -55,7 +55,7 @@ public function registerScript($view)
55
*/
56
public function validateValue($value)
57
{
58
- if (defined('RECAPTCHA_OFF') && RECAPTCHA_OFF) {
+ if (YII_ENV_TEST) {
59
return 1;
60
}
61
0 commit comments