From 0b6242c208f8c29e478f99628681d5622508d1f7 Mon Sep 17 00:00:00 2001 From: Mark van Duijker Date: Tue, 1 Dec 2020 22:17:43 +0100 Subject: [PATCH] :white_check_mark: Make integration test work with latest version of Mercure --- tests/Feature/BroadcasterTest.php | 4 ++-- tests/TestCase.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/Feature/BroadcasterTest.php b/tests/Feature/BroadcasterTest.php index 67990fa..2baf52b 100644 --- a/tests/Feature/BroadcasterTest.php +++ b/tests/Feature/BroadcasterTest.php @@ -15,7 +15,7 @@ public function test_it_broadcasts() event(new ExampleEvent('example data')); $this->assertMercureDockerLog(function ($log) { - return strpos($log, 'msg="Update published"') > 0; + return strpos($log, '\"POST /.well-known/mercure HTTP/1.1\" 200 45"') > 0; }); } @@ -43,7 +43,7 @@ private function assertMercureDockerLog(callable $matcher) /** @before */ public function startMercureServer() { - $command = "docker run -d -e JWT_KEY='aVerySecretKey' -e DEMO=1 -e ALLOW_ANONYMOUS=1 -e PUBLISH_ALLOWED_ORIGINS='http://localhost' -p 3000:80 dunglas/mercure:v0.10"; + $command = "docker run -d -p 3000:80 dunglas/mercure"; $this->mercureDockerContainerId = Process::fromShellCommandline($command) ->mustRun() diff --git a/tests/TestCase.php b/tests/TestCase.php index 7023244..cbca5a2 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -11,7 +11,7 @@ protected function getEnvironmentSetUp($app) $app['config']->set('broadcasting.default', 'mercure'); $app['config']->set('broadcasting.connections.mercure.driver', 'mercure'); $app['config']->set('broadcasting.connections.mercure.url', 'http://localhost:3000/.well-known/mercure'); - $app['config']->set('broadcasting.connections.mercure.secret', 'aVerySecretKey'); + $app['config']->set('broadcasting.connections.mercure.secret', '!ChangeMe!'); } /**