Skip to content

Commit 411c333

Browse files
committed
update disable-key for validate
1 parent 04c2d25 commit 411c333

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ public function rules()
6363
For tests
6464
---------
6565

66-
Use key ```RECAPTCHA_OFF``` in ```index-test.php``` for disable recaptcha's validate:
66+
When use ```YII_ENV_TEST``` in ```index-test.php``` then disabled recaptcha's validate:
6767
```php
68-
define('RECAPTCHA_OFF', true);
68+
defined('YII_ENV') or define('YII_ENV', 'test');
6969
```

src/ReCaptcha.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public function registerScript($view)
5555
*/
5656
public function validateValue($value)
5757
{
58-
if (defined('RECAPTCHA_OFF') && RECAPTCHA_OFF) {
58+
if (YII_ENV_TEST) {
5959
return 1;
6060
}
6161

0 commit comments

Comments
 (0)