id() 공개 메소드

public id ( ) : WishId
리턴 WishId
 /**
  * {@inheritdoc}
  */
 public function remove(Wish $wish)
 {
     unset($this->wishes[$wish->id()->id()]);
 }
예제 #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()));
 }