Skip to content

Commit

Permalink
Merge pull request #64 from Gummibeer/patch-1
Browse files Browse the repository at this point in the history
pass notification for routing
  • Loading branch information
freekmurze authored Feb 1, 2023
2 parents e6526cd + bd50554 commit d552a4a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest]
php: ['7.2', '7.3', '7.4', '8.0']
dependency-version: [prefer-lowest, prefer-stable]
php: ['7.2', '7.3', '7.4', '8.0', '8.1', '8.2']
dependency-version: [prefer-stable]

name: PHP ${{ matrix.php }} - OS ${{ matrix.os }} - ${{ matrix.dependency-version }}
steps:
Expand Down
2 changes: 1 addition & 1 deletion src/DiscordChannel.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public function __construct(Discord $discord)
*/
public function send($notifiable, Notification $notification)
{
if (! $channel = $notifiable->routeNotificationFor('discord')) {
if (! $channel = $notifiable->routeNotificationFor('discord', $notification)) {
return;
}

Expand Down
6 changes: 3 additions & 3 deletions tests/SetupCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public function it_gives_a_websocket_client_for_the_given_gateway()
{
$command = new SetupCommand(new HttpClient, 'my-token');

$socket = $command->getSocket('my-gateway');
$socket = $command->getSocket('wss://gateway.discord.gg');

$this->assertInstanceOf(Client::class, $socket);
}
Expand Down Expand Up @@ -88,7 +88,7 @@ public function it_returns_a_default_websocket_gateway_url()
public function it_connects_to_the_discord_gateway()
{
$command = Mockery::mock(SetupCommand::class.'[getGateway,getSocket,confirm,ask,warn,info]', [new HttpClient, 'my-token']);
$socket = Mockery::mock(Client::class, ['wss://gateway.discord.gg']);
$socket = Mockery::mock(Client::class.'[send,receive]', ['wss://gateway.discord.gg']);

$socket->shouldReceive('send')->with(json_encode([
'op' => 2,
Expand Down Expand Up @@ -119,7 +119,7 @@ public function it_connects_to_the_discord_gateway()
public function it_notifies_the_user_of_a_failed_identification_attempt()
{
$command = Mockery::mock(SetupCommand::class.'[getGateway,getSocket,confirm,ask,warn,error]', [new HttpClient, 'my-token']);
$socket = Mockery::mock(Client::class, ['wss://gateway.discord.gg']);
$socket = Mockery::mock(Client::class.'[send,receive]', ['wss://gateway.discord.gg']);

$socket->shouldReceive('send')->with(json_encode([
'op' => 2,
Expand Down

0 comments on commit d552a4a

Please sign in to comment.