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 to disable this class when testing? #21

Closed
lapubell opened this issue Feb 19, 2021 · 2 comments
Closed

How to disable this class when testing? #21

lapubell opened this issue Feb 19, 2021 · 2 comments

Comments

@lapubell
Copy link
Contributor

This blocker is great for prod, but when writing integration tests some of the auto generated content provided by faker gets trapped in the blocker, while some makes it through. This makes for inconsistent test behavior, as a test will sometimes fail when nothing has changed.

Is there a way to turn this package off when the ENV is set to "testing" or some other flag?

@jeremykenedy
Copy link
Owner

Yep:

LARAVEL_BLOCKER_ENABLED=false

@lapubell
Copy link
Contributor Author

rad. for anyone else running into this, add this to your phpunit.xml:

    <php>
        ...
        <env name="LARAVEL_BLOCKER_ENABLED" value="false" />
    </php>

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