Skip to content

Commit

Permalink
Fix code styling
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorotwell authored and github-actions[bot] committed Mar 4, 2024
1 parent e500063 commit 62d7d98
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 32 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@

it('can receive an event batch trigger with multiple events and gather info for some', function () {
$this->usingRedis();

subscribe('presence-test-channel');
$response = await($this->signedPostRequest('batch_events', ['batch' => [
[
Expand Down
62 changes: 31 additions & 31 deletions tests/Feature/Protocols/Pusher/Reverb/EventsControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,34 +113,34 @@
],
]);

it('can gather user counts when requested', function () {
$this->usingRedis();

subscribe('presence-test-channel-one');
$response = await($this->signedPostRequest('events', [
'name' => 'NewEvent',
'channels' => ['presence-test-channel-one', 'test-channel-two'],
'data' => json_encode(['some' => 'data']),
'info' => 'user_count',
]));
expect($response->getStatusCode())->toBe(200);
expect($response->getBody()->getContents())->toBe('{"channels":{"presence-test-channel-one":{"user_count":1},"test-channel-two":{}}}');
});
it('can gather subscription counts when requested', function () {
$this->usingRedis();

subscribe('test-channel-two');
$response = await($this->signedPostRequest('events', [
'name' => 'NewEvent',
'channels' => ['presence-test-channel-one', 'test-channel-two'],
'data' => json_encode(['some' => 'data']),
'info' => 'subscription_count',
]));
expect($response->getStatusCode())->toBe(200);
expect($response->getBody()->getContents())->toBe('{"channels":{"presence-test-channel-one":{},"test-channel-two":{"subscription_count":1}}}');
});
it('can gather user counts when requested', function () {
$this->usingRedis();

subscribe('presence-test-channel-one');

$response = await($this->signedPostRequest('events', [
'name' => 'NewEvent',
'channels' => ['presence-test-channel-one', 'test-channel-two'],
'data' => json_encode(['some' => 'data']),
'info' => 'user_count',
]));

expect($response->getStatusCode())->toBe(200);
expect($response->getBody()->getContents())->toBe('{"channels":{"presence-test-channel-one":{"user_count":1},"test-channel-two":{}}}');
});

it('can gather subscription counts when requested', function () {
$this->usingRedis();

subscribe('test-channel-two');

$response = await($this->signedPostRequest('events', [
'name' => 'NewEvent',
'channels' => ['presence-test-channel-one', 'test-channel-two'],
'data' => json_encode(['some' => 'data']),
'info' => 'subscription_count',
]));

expect($response->getStatusCode())->toBe(200);
expect($response->getBody()->getContents())->toBe('{"channels":{"presence-test-channel-one":{},"test-channel-two":{"subscription_count":1}}}');
});

0 comments on commit 62d7d98

Please sign in to comment.