Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
no-captcha
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
CENTER-TBI
no-captcha
Commits
60aa7396
Unverified
Commit
60aa7396
authored
Oct 31, 2017
by
Nguyen Van Anh
Committed by
GitHub
Oct 31, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #92 from haakym/patch-1
Testing, use for HTTP tests
parents
2478d98a
3ce0a546
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
0 deletions
+18
-0
README.md
README.md
+18
-0
No files found.
README.md
View file @
60aa7396
...
...
@@ -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:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment