id() public method

public id ( ) : WishId
return WishId
 /**
  * {@inheritdoc}
  */
 public function remove(Wish $wish)
 {
     unset($this->wishes[$wish->id()->id()]);
 }
Exemplo n.º 2
0
 public function makeWishNotBeingAnAggregate(WishId $wishId, $address, $content)
 {
     $newWish = new Wish($wishId, $this->id(), $address, $content);
     DomainEventPublisher::instance()->publish(new WishWasMade($newWish->id(), $newWish->userId(), $newWish->address(), $newWish->content()));
     return $newWish;
 }
 /**
  * @test
  */
 public function itShouldRemoveWish()
 {
     $this->deleteWishService->execute(new DeleteWishRequest($this->dummyWish->id()->id(), $this->dummyUser->id()->id()));
     $this->assertNull($this->wishRepository->wishOfId($this->dummyWish->id()));
 }