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
3ce0a546
Unverified
Commit
3ce0a546
authored
Oct 30, 2017
by
Dominic
Committed by
GitHub
Oct 30, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Testing, use for HTTP tests
Directions on how to create HTTP tests and pass the required rule
parent
2478d98a
Changes
1
Show 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 @
3ce0a546
...
@@ -132,6 +132,24 @@ NoCaptcha::shouldReceive('display')
...
@@ -132,6 +132,24 @@ NoCaptcha::shouldReceive('display')
You can then test the remainder of your form as normal.
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
## Without Laravel
Checkout example below:
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