Hi Martin,
Although this is a delayed response, hopefully it can partially help others.
Using the "Auth::login" or "Auth::loginUsingId" is not going to help - as that's logging in via the command line part of behat, whereas the broswer side (I imagine you're using Mink or something?) does not get that session data, so it is not logged in for that part.
I'm still trying to figure out how it can be done, but will let you know if I find out.
Hello,
I wrote an article on how to set up the php testing framework Behat in order to use it with the Laravel framework in a Homestead development environment. It mentions the problems one faces when testing authentication in a testing environment.
http://blog.g-design.net/post/88422737295/using-behat-with-laravel-homestead
I hope this helps.
Hi,
I just blogged about how to share set a session when using a separate server with Behat. The approach can be used with Homestead, Artisan Serve or any other separate server.
It involves passing the session cookie to the Goutte or Selenium session.
Regards!
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community