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

[5.5] Ensure user is logged before expecting user instance type. #21377

Merged
merged 2 commits into from Sep 25, 2017

Conversation

Projects
None yet
2 participants
@shulard
Contributor

shulard commented Sep 25, 2017

When using the assertAuthenticatedAs method, if the user is not logged, the output message was strange. This PR introduce a new check to ensure the user is logged.

Before :

Tests\Feature\RegisterControllerTest::testRegisterWithSpecificRole with data set #3 (5)
The currently authenticated user is not who was expected
Failed asserting that Act\User Object (...) is an instance of class "Illuminate\Foundation\Testing\TestCase".

After :

Tests\Feature\RegisterControllerTest::testRegisterWithSpecificRole with data set #3 (5)
The current user is not authenticated.
Ensure user is logged.
Check the user is logged before expecting instance type.
@shulard

This comment has been minimized.

Show comment
Hide comment
@shulard

shulard Sep 25, 2017

Contributor

The behaviour is the same on the 5.4 branch in the seeIsAuthenticatedAs method, I can make a PR on previous branches too.

Contributor

shulard commented Sep 25, 2017

The behaviour is the same on the 5.4 branch in the seeIsAuthenticatedAs method, I can make a PR on previous branches too.

@taylorotwell taylorotwell merged commit 5218ea6 into laravel:5.5 Sep 25, 2017

1 check passed

continuous-integration/styleci/pr The StyleCI analysis has passed
Details

@GrahamCampbell GrahamCampbell changed the title from Ensure user is logged before expecting user instance type. to [5.5] Ensure user is logged before expecting user instance type. Sep 25, 2017

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