From bc3cb7bfd5131f43fb9a47e18b7a3d6aba396ed6 Mon Sep 17 00:00:00 2001 From: Dane Everitt Date: Sat, 10 Mar 2018 13:02:49 -0600 Subject: [PATCH] Fix broken session driver test --- .../Http/Middleware/API/SetSessionDriverTest.php | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/tests/Unit/Http/Middleware/API/SetSessionDriverTest.php b/tests/Unit/Http/Middleware/API/SetSessionDriverTest.php index 0f33f6735..36f1bc0b8 100644 --- a/tests/Unit/Http/Middleware/API/SetSessionDriverTest.php +++ b/tests/Unit/Http/Middleware/API/SetSessionDriverTest.php @@ -37,8 +37,8 @@ class SetSessionDriverTest extends MiddlewareTestCase */ public function testProductionEnvironment() { - $this->appMock->shouldReceive('environment')->withNoArgs()->once()->andReturn('production'); - $this->config->shouldReceive('set')->with('session.driver', 'array')->once()->andReturnNull(); + $this->config->shouldReceive('get')->once()->with('app.debug')->andReturn(false); + $this->config->shouldReceive('set')->once()->with('session.driver', 'array')->andReturnNull(); $this->getMiddleware()->handle($this->request, $this->getClosureAssertions()); } @@ -48,11 +48,10 @@ class SetSessionDriverTest extends MiddlewareTestCase */ public function testLocalEnvironment() { - $this->appMock->shouldReceive('environment')->withNoArgs()->once()->andReturn('local'); - $this->appMock->shouldReceive('make')->with(LaravelDebugbar::class)->once()->andReturnSelf(); - $this->appMock->shouldReceive('disable')->withNoArgs()->once()->andReturnNull(); - - $this->config->shouldReceive('set')->with('session.driver', 'array')->once()->andReturnNull(); + $this->config->shouldReceive('get')->once()->with('app.debug')->andReturn(true); + $this->appMock->shouldReceive('make')->once()->with(LaravelDebugbar::class)->andReturnSelf(); + $this->appMock->shouldReceive('disable')->once()->withNoArgs()->andReturnNull(); + $this->config->shouldReceive('set')->once()->with('session.driver', 'array')->andReturnNull(); $this->getMiddleware()->handle($this->request, $this->getClosureAssertions()); }