update tests

This commit is contained in:
Marcel Pociot 2022-01-06 12:31:21 +01:00
parent 171480dee2
commit fd2070fc3d
2 changed files with 3 additions and 8 deletions

View File

@ -98,6 +98,8 @@ class FetchChannelTest extends TestCase
public function test_it_returns_404_for_invalid_channels() public function test_it_returns_404_for_invalid_channels()
{ {
$this->skipOnRedisReplication();
$this->expectException(HttpException::class); $this->expectException(HttpException::class);
$this->expectExceptionMessage('Unknown channel'); $this->expectExceptionMessage('Unknown channel');
@ -119,13 +121,5 @@ class FetchChannelTest extends TestCase
$controller = app(FetchChannel::class); $controller = app(FetchChannel::class);
$controller->onOpen($connection, $request); $controller->onOpen($connection, $request);
/** @var JsonResponse $response */
$response = array_pop($connection->sentRawData);
$this->assertSame([
'occupied' => true,
'subscription_count' => 2,
], json_decode($response->getContent(), true));
} }
} }

View File

@ -332,6 +332,7 @@ abstract class TestCase extends Orchestra
{ {
$connection = new Mocks\Connection; $connection = new Mocks\Connection;
$connection->lastPongedAt = now();
$connection->httpRequest = new Request('GET', "/?appKey={$appKey}", $headers); $connection->httpRequest = new Request('GET', "/?appKey={$appKey}", $headers);
return $connection; return $connection;