Just manually log in the user.
$user = User::find(1);
Auth::login($user);
Hi Guys!
I'm learning Codeception using Laravel 4, and I was wondering, how do you manage to write a functional test to test a feature that requires you to be logged in order to see the page?
For example, if I test that I have to be on /posts and see "My Posts", then this would not work, because I'm not logged in, and I'll get "Log In" instead. Do I have to write the code to first test that I'm logged in for every test that requires to be logged in?
Please or to participate in this conversation.