Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add troubleshooting approach to solve
Session not set on request
.
Closes #102. Signed-off-by: crynobone <crynobone@gmail.com>
- Loading branch information
b92eea8
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I got an error that "pushMiddleware" doesn't exist.
However, another way to solve this issue (e.g. for unit testing) is to use an array as session driver in the setUp() method in TestCase:
$this->app['request']->setSession($this->app['session']->driver('array'));
b92eea8
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The method does exist on
Illuminate\Foundation\Http\Middleware
so I not sure what you're talking about.https://github.com/laravel/framework/blob/5.1/src/Illuminate/Foundation/Http/Kernel.php#L205
And furthermore this is only an issue with Testbench 3.1 which targetted for Laravel 5.1