Skip to content

Commit 152e8f1

Browse files
committed
Update docs
1 parent 6560f15 commit 152e8f1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/testing/7-mocking-your-kafka-consumer.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public function test_post_is_marked_as_published()
2020

2121
// Then, tells Kafka what messages the consumer should receive:
2222
\Junges\Kafka\Facades\Kafka::shouldReceiveMessages([
23-
new ConsumedMessage(
23+
new \Junges\Kafka\Message\ConsumedMessage(
2424
topicName: 'mark-post-as-published-topic',
2525
partition: 0,
2626
headers: [],
@@ -33,8 +33,8 @@ public function test_post_is_marked_as_published()
3333

3434
// Now, instantiate your consumer and start consuming messages. It will consume only the messages
3535
// specified in `shouldReceiveMessages` method:
36-
$consumer = Kafka::consumer(['mark-post-as-published-topic'])
37-
->withHandler(function (KafkaConsumerMessage $message) use (&$posts) {
36+
$consumer = \Junges\Kafka\Facades\Kafka::consumer(['mark-post-as-published-topic'])
37+
->withHandler(function (\Junges\Kafka\Contracts\ConsumerMessage $message) use (&$posts) {
3838
$post = Post::find($message->getBody()['post_id']);
3939

4040
$post->update(['published_at' => now()->format("Y-m-d H:i:s")]);

0 commit comments

Comments
 (0)