Skip to content

Commit bc3cb7b

Browse files
committed
Fix broken session driver test
1 parent e5c59c4 commit bc3cb7b

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

tests/Unit/Http/Middleware/API/SetSessionDriverTest.php

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ public function setUp()
3737
*/
3838
public function testProductionEnvironment()
3939
{
40-
$this->appMock->shouldReceive('environment')->withNoArgs()->once()->andReturn('production');
41-
$this->config->shouldReceive('set')->with('session.driver', 'array')->once()->andReturnNull();
40+
$this->config->shouldReceive('get')->once()->with('app.debug')->andReturn(false);
41+
$this->config->shouldReceive('set')->once()->with('session.driver', 'array')->andReturnNull();
4242

4343
$this->getMiddleware()->handle($this->request, $this->getClosureAssertions());
4444
}
@@ -48,11 +48,10 @@ public function testProductionEnvironment()
4848
*/
4949
public function testLocalEnvironment()
5050
{
51-
$this->appMock->shouldReceive('environment')->withNoArgs()->once()->andReturn('local');
52-
$this->appMock->shouldReceive('make')->with(LaravelDebugbar::class)->once()->andReturnSelf();
53-
$this->appMock->shouldReceive('disable')->withNoArgs()->once()->andReturnNull();
54-
55-
$this->config->shouldReceive('set')->with('session.driver', 'array')->once()->andReturnNull();
51+
$this->config->shouldReceive('get')->once()->with('app.debug')->andReturn(true);
52+
$this->appMock->shouldReceive('make')->once()->with(LaravelDebugbar::class)->andReturnSelf();
53+
$this->appMock->shouldReceive('disable')->once()->withNoArgs()->andReturnNull();
54+
$this->config->shouldReceive('set')->once()->with('session.driver', 'array')->andReturnNull();
5655

5756
$this->getMiddleware()->handle($this->request, $this->getClosureAssertions());
5857
}

0 commit comments

Comments
 (0)