From a3551b50b1ebdb5f7d06107ddf37cf3ad92d1a97 Mon Sep 17 00:00:00 2001 From: GetulioMR Date: Tue, 10 Oct 2023 12:11:43 -0300 Subject: [PATCH] fix(tests): enable to get broker connection from env --- tests/Unit/Connectors/Producer/ConnectorTest.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/Unit/Connectors/Producer/ConnectorTest.php b/tests/Unit/Connectors/Producer/ConnectorTest.php index 650dbd02..dc2dfe96 100644 --- a/tests/Unit/Connectors/Producer/ConnectorTest.php +++ b/tests/Unit/Connectors/Producer/ConnectorTest.php @@ -29,7 +29,8 @@ public function testItShouldMakeSetup(): void m::mock(KafkaProducer::class) ); - $broker = new Broker('kafka:9092', new None()); + $connections = env('KAFKA_BROKER_CONNECTIONS', 'kafka:9092'); + $broker = new Broker($connections, new None()); $producerConfigOptions = m::mock(ProducerConfigOptions::class); $connector = new Connector(); @@ -79,7 +80,8 @@ public function testItShouldMakeSetupWithoutHandleResponse(): void m::mock(KafkaProducer::class) ); - $broker = new Broker('kafka:9092', new None()); + $connections = env('KAFKA_BROKER_CONNECTIONS', 'kafka:9092'); + $broker = new Broker($connections, new None()); $producerConfigOptions = m::mock(ProducerConfigOptions::class); $connector = new Connector();