Skip to content

Commit

Permalink
get user directly from auth->user()
Browse files Browse the repository at this point in the history
  • Loading branch information
recca0120 authored Mar 26, 2018
1 parent d9d8394 commit ca76136
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions tests/Panels/AuthPanelTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,10 @@ public function testRenderFromGuard()

$laravel->shouldReceive('offsetExists')->once()->with('sentinel')->andReturn(false);

$laravel->shouldReceive('offsetGet')->once()->with('session')->andReturn(
$sessionManager = m::mock('Illuminate\Session\SessionManager')
);
$laravel->shouldReceive('offsetGet')->once()->with('auth')->andReturn(
$auth = m::mock('Illuminate\Contracts\Auth\Guard')
);
$auth->shouldReceive('getName')->once()->andReturn($name = 'foo');
$sessionManager->shouldReceive('has')->once()->with($name)->andReturn(true);

$auth->shouldReceive('user')->once()->andReturn(
$user = m::mock('stdClass')
);
Expand Down

0 comments on commit ca76136

Please sign in to comment.