@martingg88 try changing the SESSION_DRIVER in your phpunit.xml to 'file'.
May 19, 2016
5
Level 1
Session issue for Unit testing
I have created test case and that have two issues. I would be appreciated if someone can help to solved this issue thanks.
session is not persisted across the multiple calls/routes "assertSessionHasErrors" doesn't work as "errors" key is not stored in $this->app['session.store']. However "errors" key exists in session()->all().
public function testFailSignup(){ $getResponse = $this->route('GET', 'signup'); $postResponse = $this->route('POST', 'submitSignup', [], []); $this->assertSessionHasErrors(); }
Please or to participate in this conversation.