Skip to content

Commit

Permalink
update disable-key for validate
Browse files Browse the repository at this point in the history
  • Loading branch information
kekaadrenalin committed Feb 22, 2019
1 parent 04c2d25 commit 411c333
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public function rules()
For tests
---------

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:
```php
define('RECAPTCHA_OFF', true);
defined('YII_ENV') or define('YII_ENV', 'test');
```
2 changes: 1 addition & 1 deletion src/ReCaptcha.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public function registerScript($view)
*/
public function validateValue($value)
{
if (defined('RECAPTCHA_OFF') && RECAPTCHA_OFF) {
if (YII_ENV_TEST) {
return 1;
}

Expand Down

0 comments on commit 411c333

Please sign in to comment.