diff --git a/tests/Unit/EnvelopeTest.php b/tests/Unit/EnvelopeTest.php index af412125..d7e4650e 100644 --- a/tests/Unit/EnvelopeTest.php +++ b/tests/Unit/EnvelopeTest.php @@ -24,24 +24,27 @@ public function testEnvelopeStack(): void $this->assertEquals([ IdEnvelope::class, ], $stack); + + $this->assertEquals('test-id', $message->getMetadata()[IdEnvelope::MESSAGE_ID_KEY]); } public function testEnvelopeDuplicates(): void { $message = new Message('handler', 'test'); - $message = new IdEnvelope($message, 'test-id'); - $message = new IdEnvelope($message, 'test-id'); - $message = new IdEnvelope($message, 'test-id'); + $message = new IdEnvelope($message, 'test-id-1'); + $message = new IdEnvelope($message, 'test-id-2'); + $message = new IdEnvelope($message, 'test-id-3'); $this->assertEquals('test', $message->getMessage()->getData()); $stack = $message->getMetadata()[EnvelopeInterface::ENVELOPE_STACK_KEY]; $this->assertIsArray($stack); - $this->assertEquals([ IdEnvelope::class, IdEnvelope::class, IdEnvelope::class, ], $stack); + + $this->assertEquals('test-id-3', $message->getMetadata()[IdEnvelope::MESSAGE_ID_KEY]); } }