Skip to content
This repository has been archived by the owner on Sep 10, 2024. It is now read-only.

Commit

Permalink
fix AuthenticateTest
Browse files Browse the repository at this point in the history
  • Loading branch information
albertcht committed Aug 25, 2019
1 parent 9b2d2c1 commit 8b6ffc0
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions tests/Websocket/Middleware/AuthenticateTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,17 @@ class AuthenticateTest extends TestCase
{
public function testAuthenticate()
{
$request = m::mock(Request::class);
$request->shouldReceive('setUserResolver')
->once();

$auth = m::mock(Auth::class);
$auth->shouldReceive('authenticate')
->once()
->andReturn('user');

$request = m::mock(Request::class);
$request->shouldReceive('setUserResolver')
->once();
$auth->shouldReceive('setRequest')
->with($request)
->once();

$middleware = new Authenticate($auth);
$middleware->handle($request, function ($next) {
Expand Down

0 comments on commit 8b6ffc0

Please sign in to comment.