diff --git a/tests/TestCase.php b/tests/TestCase.php index 34838af..d83bd9b 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -274,7 +274,7 @@ abstract class TestCase extends BaseTestCase // Replace the publish and subscribe clients with a Mocked // factory lazy instance on boot. - $this->app->singleton(ReplicationInterface::class, function () { + $this->app->singleton(ReplicationInterface::class, function () use ($replicationDriver) { $client = config( "websockets.replication.{$replicationDriver}.client", \BeyondCode\LaravelWebSockets\PubSub\Drivers\LocalClient::class