diff --git a/example/protobuf-async-message/consumer/tests/MessageHandler/PersonMessageHandlerTest.php b/example/protobuf-async-message/consumer/tests/MessageHandler/PersonMessageHandlerTest.php index 3b4c683e..c528d47f 100644 --- a/example/protobuf-async-message/consumer/tests/MessageHandler/PersonMessageHandlerTest.php +++ b/example/protobuf-async-message/consumer/tests/MessageHandler/PersonMessageHandlerTest.php @@ -58,6 +58,26 @@ public function testInvoke(): void 'given' => $this->matcher->like($this->given), 'surname' => $this->matcher->like($this->surname), ], + 'children' => $this->matcher->matchAll( + ['Zane' => 12], + [ + $this->matcher->eachKey( + [], + [$this->matcher->string()] + ), + $this->matcher->eachValue( + [], + [ + $this->matcher->number(23), + ], + ), + $this->matcher->atLeast(0), + $this->matcher->atMost(3), + // These matchers are allowed, but are not recommend + // $this->matcher->atLeastLike(123, 2), + // $this->matcher->atMostLike(234, 3), + ], + ), ]), 'application/protobuf' )); diff --git a/example/protobuf-async-message/library/proto/say_hello.proto b/example/protobuf-async-message/library/proto/say_hello.proto index 7db28ef6..b64c26ac 100644 --- a/example/protobuf-async-message/library/proto/say_hello.proto +++ b/example/protobuf-async-message/library/proto/say_hello.proto @@ -5,6 +5,7 @@ package library; message Person { string id = 1; Name name = 2; + map children = 3; } message Name {