Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
joedixon committed Nov 20, 2023
1 parent dd24dee commit dd25376
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions tests/Feature/Reverb/ServerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -126,12 +126,12 @@

$this->triggerEvent(
'test-channel',
'TestEvent',
'App\\Events\\TestEvent',
['foo' => 'bar']
);

foreach (await(all([$promiseOne, $promiseTwo, $promiseThree])) as $response) {
expect($response)->toBe('{"event":"TestEvent","data":{"foo":"bar"},"channel":"test-channel"}');
expect($response)->toBe('{"event":"App\\\\Events\\\\TestEvent","data":{"foo":"bar"},"channel":"test-channel"}');
}
});

Expand All @@ -142,11 +142,11 @@

$this->triggerEvent(
'presence-test-channel',
'TestEvent',
'App\\Events\\TestEvent',
['foo' => 'bar']
);

expect(await($promise))->toBe('{"event":"TestEvent","data":{"foo":"bar"},"channel":"presence-test-channel"}');
expect(await($promise))->toBe('{"event":"App\\\\Events\\\\TestEvent","data":{"foo":"bar"},"channel":"presence-test-channel"}');
});

it('can respond to a ping', function () {
Expand Down Expand Up @@ -299,11 +299,11 @@

$this->triggerEvent(
'presence-test-channel',
'TestEvent',
'App\\Events\\TestEvent',
['foo' => 'bar']
);

expect(await($promise))->toBe('{"event":"TestEvent","data":{"foo":"bar"},"channel":"presence-test-channel"}');
expect(await($promise))->toBe('{"event":"App\\\\Events\\\\TestEvent","data":{"foo":"bar"},"channel":"presence-test-channel"}');
});

it('can publish and subscribe to a client whisper', function () {
Expand Down
2 changes: 1 addition & 1 deletion tests/ReverbTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ public function messagePromise(WebSocket $connection)
$promise->resolve((string) $message);
});

return timeout($promise->promise(), 0.1, $this->loop)
return timeout($promise->promise(), 0.5, $this->loop)
->then(
fn ($message) => $message,
fn (TimeoutException $error) => false
Expand Down

0 comments on commit dd25376

Please sign in to comment.