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

Reset Filters between feature tests #3237

Merged
merged 1 commit into from
Jul 7, 2020

Conversation

MGatner
Copy link
Member

@MGatner MGatner commented Jul 7, 2020

Description
CodeIgniter::handleRequest() uses the shared Filters service to determine which filters to run for a particular route. The problem is that between feature tests this service remains, so different routes may actually run or not run filters they should.

This PR implements a bit of a hack to reset just the Filters service before making a feature test call. If other services turn out to have similar carry-over baggage it might make sense to have some way of doing selective service resets.

Checklist:

  • Securely signed commits
  • Component(s) with PHPdocs
  • Unit testing, with >80% coverage
  • n/a User guide updated
  • Conforms to style guide

@lonnieezell lonnieezell merged commit 5e50c4d into codeigniter4:develop Jul 7, 2020
@MGatner MGatner deleted the features-filters branch June 23, 2021 13:38
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

Successfully merging this pull request may close these issues.

2 participants