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

Add test trait #247

Merged
merged 1 commit into from
Jul 7, 2020
Merged

Add test trait #247

merged 1 commit into from
Jul 7, 2020

Conversation

MGatner
Copy link
Collaborator

@MGatner MGatner commented Jul 7, 2020

I have a lot more things I'd like to see in this trait, but this one is pressing. The Auth services don't automatically reset to session values between tests, so unless they are loaded or mocked manually they will use stale values. This is particularly troublesome for feature testing with filters (see also: codeigniter4/CodeIgniter4#3085).

This PR adds the trait class itself and resetAuthServices() to help with clearing Auth and session data between tests.

@lonnieezell lonnieezell merged commit 86a0256 into lonnieezell:develop Jul 7, 2020
@MGatner MGatner deleted the test-trait branch July 7, 2020 21:05
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