From fd2070fc3d28696247acceacc4f40667828f3016 Mon Sep 17 00:00:00 2001 From: Marcel Pociot Date: Thu, 6 Jan 2022 12:31:21 +0100 Subject: [PATCH] update tests --- tests/FetchChannelTest.php | 10 ++-------- tests/TestCase.php | 1 + 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/tests/FetchChannelTest.php b/tests/FetchChannelTest.php index 2b73fb0..53300cc 100644 --- a/tests/FetchChannelTest.php +++ b/tests/FetchChannelTest.php @@ -98,6 +98,8 @@ class FetchChannelTest extends TestCase public function test_it_returns_404_for_invalid_channels() { + $this->skipOnRedisReplication(); + $this->expectException(HttpException::class); $this->expectExceptionMessage('Unknown channel'); @@ -119,13 +121,5 @@ class FetchChannelTest extends TestCase $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)); } } diff --git a/tests/TestCase.php b/tests/TestCase.php index 3017980..6d4853a 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -332,6 +332,7 @@ abstract class TestCase extends Orchestra { $connection = new Mocks\Connection; + $connection->lastPongedAt = now(); $connection->httpRequest = new Request('GET', "/?appKey={$appKey}", $headers); return $connection;