Skip to content

Commit

Permalink
Merge pull request #63 from claudsonm/uuid-accessor
Browse files Browse the repository at this point in the history
Adding UUID accessor method
  • Loading branch information
freekmurze authored Oct 4, 2020
2 parents 3b4693f + 5edb33d commit d2efcf7
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/WebhookCall.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
9 changes: 9 additions & 0 deletions tests/WebhookTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}
}

0 comments on commit d2efcf7

Please sign in to comment.