File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed
tests/Unit/Http/Middleware/API Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff 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 }
You can’t perform that action at this time.
0 commit comments