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

[L5] Authentication doesn't persist between requests #2795

Anahkiasen opened this Issue Feb 13, 2016 · 1 comment


None yet
2 participants

Anahkiasen commented Feb 13, 2016

Using $I->amLoggedAs(User::find(1)) will execute the following code:

if ($user instanceof Authenticatable) {

However this just calls AuthManager::setUser which just sets the authenticated user for the current request. Instead I believe AuthManager::login should be called, which remembers the user in session, for future requests as well.

Without this if in your functional tests you submit a form or click on a link, you'll be back to the login form. Or was this intended behavior and if so how do I work around this?


This comment has been minimized.

Show comment
Hide comment

janhenkgerritsen Feb 13, 2016


This was not intended behavior, thanks for reporting the issue!


janhenkgerritsen commented Feb 13, 2016

This was not intended behavior, thanks for reporting the issue!

janhenkgerritsen added a commit that referenced this issue Feb 13, 2016

Merge pull request #2796 from janhenkgerritsen/2.1
Fix issue with Laravel 5 module amLoggedAs method, see #2795

Naktibalda added a commit to Naktibalda/Codeception that referenced this issue Feb 13, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment