Ejemplo n.º 1
0
 /**
  * @test
  */
 public function it_can_invite_someone()
 {
     $id = $this->generator->generate();
     $this->scenario->when(function () use($id) {
         return Invitation::invite($id, 'asm89');
     })->then([new InvitedEvent($id, 'asm89')]);
 }
Ejemplo n.º 2
0
 /**
  * A new invite aggregate root is created and added to the repository.
  */
 protected function handleInviteCommand(InviteCommand $command)
 {
     $invitation = Invitation::invite($command->invitationId, $command->name);
     $this->repository->save($invitation);
 }
 /**
  * A new invite aggregate root is created and added to the repository.
  */
 protected function handleInviteCommand(InviteCommand $command)
 {
     $invitation = Invitation::invite($command->invitationId, $command->name);
     $this->sensitiveDataManager->setSensitiveData(new \othillo\BroadwaySensitiveData\EventHandling\SensitiveData(['password' => $command->password]));
     $this->repository->save($invitation);
 }