Skip to content
This repository has been archived by the owner on Feb 7, 2024. It is now read-only.

Commit

Permalink
update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mpociot committed Jan 6, 2022
1 parent 171480d commit fd2070f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
10 changes: 2 additions & 8 deletions tests/FetchChannelTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,8 @@ public function test_it_returns_presence_channel_information()

public function test_it_returns_404_for_invalid_channels()
{
$this->skipOnRedisReplication();

$this->expectException(HttpException::class);
$this->expectExceptionMessage('Unknown channel');

Expand All @@ -119,13 +121,5 @@ public function test_it_returns_404_for_invalid_channels()
$controller = app(FetchChannel::class);

$controller->onOpen($connection, $request);

/** @var JsonResponse $response */
$response = array_pop($connection->sentRawData);

$this->assertSame([
'occupied' => true,
'subscription_count' => 2,
], json_decode($response->getContent(), true));
}
}
1 change: 1 addition & 0 deletions tests/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,7 @@ protected function newConnection(string $appKey = 'TestKey', array $headers = []
{
$connection = new Mocks\Connection;

$connection->lastPongedAt = now();
$connection->httpRequest = new Request('GET', "/?appKey={$appKey}", $headers);

return $connection;
Expand Down

0 comments on commit fd2070f

Please sign in to comment.