From 5edb33d822aa95389da5bfd97adabcc0a95d4bc4 Mon Sep 17 00:00:00 2001 From: Claudson Martins Date: Sun, 4 Oct 2020 11:23:06 -0300 Subject: [PATCH] Added UUID accessor --- src/WebhookCall.php | 5 +++++ tests/WebhookTest.php | 9 +++++++++ 2 files changed, 14 insertions(+) diff --git a/src/WebhookCall.php b/src/WebhookCall.php index e830010..6f50625 100644 --- a/src/WebhookCall.php +++ b/src/WebhookCall.php @@ -72,6 +72,11 @@ public function uuid(string $uuid): self return $this; } + public function getUuid(): string + { + return $this->uuid; + } + public function onQueue(string $queue): self { $this->callWebhookJob->queue = $queue; diff --git a/tests/WebhookTest.php b/tests/WebhookTest.php index a760376..9882e4a 100644 --- a/tests/WebhookTest.php +++ b/tests/WebhookTest.php @@ -81,4 +81,13 @@ public function it_will_throw_and_exception_when_using_an_invalid_signer() WebhookCall::create()->signUsing(static::class); } + + /** @test */ + public function it_can_get_the_uuid_property() + { + $webhookCall = WebhookCall::create()->uuid('my-unique-identifier'); + + $this->assertIsString($webhookCall->getUuid()); + $this->assertSame('my-unique-identifier', $webhookCall->getUuid()); + } }