Beispiel #1
0
 public function __construct(WishId $wishId, UserId $userId, $email, $content)
 {
     parent::__construct($wishId, $userId, $content);
     $this->setEmail($email);
     $this->setContent($content);
     $transport = \Swift_SmtpTransport::newInstance('smtp.mandrillapp.com', 587)->setUsername('*****@*****.**')->setPassword('cIX_fPnttAiI59bAmhuwpw');
     $this->mailer = \Swift_Mailer::newInstance($transport);
 }
Beispiel #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;
 }
 /**
  * {@inheritdoc}
  */
 public function remove(Wish $wish)
 {
     unset($this->wishes[$wish->id()->id()]);
 }
 /**
  * @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()));
 }