@@ -49,7 +49,7 @@ public function it_gives_a_websocket_client_for_the_given_gateway()
4949 {
5050 $ command = new SetupCommand (new HttpClient , 'my-token ' );
5151
52- $ socket = $ command ->getSocket ('my- gateway ' );
52+ $ socket = $ command ->getSocket ('wss:// gateway.discord.gg ' );
5353
5454 $ this ->assertInstanceOf (Client::class, $ socket );
5555 }
@@ -88,7 +88,7 @@ public function it_returns_a_default_websocket_gateway_url()
8888 public function it_connects_to_the_discord_gateway ()
8989 {
9090 $ command = Mockery::mock (SetupCommand::class.'[getGateway,getSocket,confirm,ask,warn,info] ' , [new HttpClient , 'my-token ' ]);
91- $ socket = Mockery::mock (Client::class, ['wss://gateway.discord.gg ' ]);
91+ $ socket = Mockery::mock (Client::class. ' [send,receive] ' , ['wss://gateway.discord.gg ' ]);
9292
9393 $ socket ->shouldReceive ('send ' )->with (json_encode ([
9494 'op ' => 2 ,
@@ -119,7 +119,7 @@ public function it_connects_to_the_discord_gateway()
119119 public function it_notifies_the_user_of_a_failed_identification_attempt ()
120120 {
121121 $ command = Mockery::mock (SetupCommand::class.'[getGateway,getSocket,confirm,ask,warn,error] ' , [new HttpClient , 'my-token ' ]);
122- $ socket = Mockery::mock (Client::class, ['wss://gateway.discord.gg ' ]);
122+ $ socket = Mockery::mock (Client::class. ' [send,receive] ' , ['wss://gateway.discord.gg ' ]);
123123
124124 $ socket ->shouldReceive ('send ' )->with (json_encode ([
125125 'op ' => 2 ,
0 commit comments