Commit 60aa7396 authored by Nguyen Van Anh's avatar Nguyen Van Anh Committed by GitHub

Merge pull request #92 from haakym/patch-1

Testing, use for HTTP tests
parents 2478d98a 3ce0a546
......@@ -132,6 +132,24 @@ NoCaptcha::shouldReceive('display')
You can then test the remainder of your form as normal.
When using HTTP tests you can add the `g-recaptcha-response` to the request body for the 'required' validation:
```php
// prevent validation error on captcha
NoCaptcha::shouldReceive('verifyResponse')
->once()
->andReturn(true);
// POST request, with request body including g-recaptcha-response
$response = $this->json('POST', '/register', [
'g-recaptcha-response' => '1',
'name' => 'John',
'email' => 'john@example.com',
'password' => '123456',
'password_confirmation' => '123456',
]);
```
## Without Laravel
Checkout example below:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment