Skip to content

Commit

Permalink
✅ Make integration test work with latest version of Mercure
Browse files Browse the repository at this point in the history
  • Loading branch information
mvanduijker committed Dec 1, 2020
1 parent dfb030e commit 0b6242c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions tests/Feature/BroadcasterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
});
}

Expand Down Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion tests/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -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!');
}

/**
Expand Down

0 comments on commit 0b6242c

Please sign in to comment.