laravel-password-exposed-validation-rule icon indicating copy to clipboard operation
laravel-password-exposed-validation-rule copied to clipboard

Unable to Mock in Application Tests

Open mcordingley opened this issue 6 years ago • 2 comments

I'm attempting to use this library in a project. I'd like to be able to mock it during unit tests, so my local tests don't try to reach out to external systems. However, the library exposes no hooks to slip in a mock during testing. I tried to skirt the issue by resolving an instance of the rule from the Laravel container, but that ended up bypassing the internal factory method.

mcordingley avatar May 21 '19 17:05 mcordingley

Good point. Have you got any thoughts of how you'd like to see this implemented?

DivineOmega avatar May 22 '19 15:05 DivineOmega

I think reworking it to more heavily lean on #11 would do the trick.

mcordingley avatar May 22 '19 15:05 mcordingley