Skip to content

Commit

Permalink
fix(tests): enable to get broker connection from env
Browse files Browse the repository at this point in the history
  • Loading branch information
GetulioMR committed Oct 10, 2023
1 parent f44e2f9 commit a3551b5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/Unit/Connectors/Producer/ConnectorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit a3551b5

Please sign in to comment.