Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can I mock this ? #39

Open
LaurentEsc opened this issue Oct 21, 2015 · 1 comment
Open

How can I mock this ? #39

LaurentEsc opened this issue Oct 21, 2015 · 1 comment

Comments

@LaurentEsc
Copy link
Contributor

Hi, thank you for this nice package which works nicely.

I am using it in a registration form and want to add an integration test to make sure the form can be filled and submitted properly. However, the form is filled too fast by my tests and the validation fails. I am looking for a way to mock the HoneypotValidator->validateHoneytime() method and make it return true during my test.

Is there a way to do this ?

Thank you

@garygreen
Copy link
Contributor

You could just not add the honeypot and honeytime rules to your validator if it detects your app as running under a testing environment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants