33namespace BeyondCode \LaravelWebSockets \Test ;
44
55use BeyondCode \LaravelWebSockets \API \FetchUsers ;
6- use BeyondCode \LaravelWebSockets \Facades \WebSocketRouter ;
7- use BeyondCode \LaravelWebSockets \Server \Loggers \HttpLogger ;
8- use BeyondCode \LaravelWebSockets \Server \Loggers \WebSocketsLogger ;
9- use BeyondCode \LaravelWebSockets \ServerFactory ;
10- use Clue \React \Buzz \Browser ;
11- use Clue \React \Buzz \Message \ResponseException ;
126use GuzzleHttp \Psr7 \Request ;
13- use Illuminate \Support \Facades \Http ;
147use Pusher \Pusher ;
15- use Symfony \Component \Console \Output \BufferedOutput ;
16- use Symfony \Component \HttpKernel \Exception \HttpException ;
17- use function Clue \React \Block \await ;
188
199class FetchUsersTest extends TestCase
2010{
@@ -28,7 +18,7 @@ public function test_invalid_signatures_can_not_access_the_api()
2818 'TestKey ' , 'InvalidSecret ' , 'GET ' , $ requestPath
2919 );
3020
31- $ response = $ this ->await ($ this ->browser ->get ('http://localhost:4000 ' . "{$ requestPath }? {$ queryString }" ));
21+ $ response = $ this ->await ($ this ->browser ->get ('http://localhost:4000 ' . "{$ requestPath }? {$ queryString }" ));
3222
3323 $ this ->assertSame (401 , $ response ->getStatusCode ());
3424 $ this ->assertSame ('{"error":"Invalid auth signature provided."} ' , $ response ->getBody ()->getContents ());
@@ -44,7 +34,7 @@ public function test_it_only_returns_data_for_presence_channels()
4434 'TestKey ' , 'TestSecret ' , 'GET ' , $ requestPath
4535 );
4636
47- $ response = $ this ->await ($ this ->browser ->get ('http://localhost:4000 ' . "{$ requestPath }? {$ queryString }" ));
37+ $ response = $ this ->await ($ this ->browser ->get ('http://localhost:4000 ' . "{$ requestPath }? {$ queryString }" ));
4838
4939 $ this ->assertSame (400 , $ response ->getStatusCode ());
5040 $ this ->assertSame ('{"error":"Invalid presence channel `my-channel`"} ' , $ response ->getBody ()->getContents ());
@@ -60,7 +50,7 @@ public function test_it_returns_400_for_invalid_channels()
6050 'TestKey ' , 'TestSecret ' , 'GET ' , $ requestPath
6151 );
6252
63- $ response = $ this ->await ($ this ->browser ->get ('http://localhost:4000 ' . "{$ requestPath }? {$ queryString }" ));
53+ $ response = $ this ->await ($ this ->browser ->get ('http://localhost:4000 ' . "{$ requestPath }? {$ queryString }" ));
6454
6555 $ this ->assertSame (400 , $ response ->getStatusCode ());
6656 $ this ->assertSame ('{"error":"Invalid presence channel `invalid-channel`"} ' , $ response ->getBody ()->getContents ());
0 commit comments