Skip to content

Commit

Permalink
Fix id in domain events
Browse files Browse the repository at this point in the history
  • Loading branch information
Hilari Moragrega committed Feb 27, 2018
1 parent f538257 commit 09267ae
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Cmp/Queues/Domain/Event/DomainEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ public function getDelay()
*/
public function getID()
{
return $this->uuid;
return $this->id;
}

/**
Expand Down
12 changes: 11 additions & 1 deletion tests/spec/Cmp/Queues/Domain/Event/DomainEventSpec.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class DomainEventSpec extends ObjectBehavior
function let()
{
$this->time = microtime(true)-10;
$this->beConstructedWith('origin', 'name', '1.0.0', $this->time, array(1,2,3));
$this->beConstructedWith('origin', 'name', '1.0.0', $this->time, array(1,2,3), 'uuid', true);
}

function it_is_initializable()
Expand Down Expand Up @@ -85,4 +85,14 @@ function it_should_get_body()
{
$this->getBody()->shouldBe(array(1,2,3));
}

function it_should_get_the_id()
{
$this->getID()->shouldBe('uuid');
}

function it_should_get_the_deprecated_flag()
{
$this->isDeprecated()->shouldBe(true);
}
}

0 comments on commit 09267ae

Please sign in to comment.