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

Middleware not being tested #87

Open
michaellindahl opened this issue Oct 20, 2019 · 0 comments
Open

Middleware not being tested #87

michaellindahl opened this issue Oct 20, 2019 · 0 comments

Comments

@michaellindahl
Copy link

michaellindahl commented Oct 20, 2019

I found that I had an error in my middleware but this was not caught by the tests. It looks like the tests do not run the middleware. This would be great feature to add.

Steps to repro:

  1. Install Botman Studios
  2. Add Middleware with die(); in methods.

Expectation: Tests will fail and Botman Tinker will not respond.

Actual: Tests pass and Botman Tinker does not respond.

Temporary Solution: Mirror the middleware statements in BotManController to the test's CreatesApplication.php.

Proposed solution: I believe an ideal solution might be to have the BotManServiceProvider register the middleware and botman route from the specification of the botman config. This would remove the handle method from BotManController so that this controller is no longer required. Is there other logic that others might be using handle for that would need to be accounted for in this refactor?

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

1 participant