Exemplo n.º 1
0
 /**
  * Apply the third party account linked event
  *
  * @param ThirdPartyAccountLinkedEvent $event
  */
 protected function applyThirdPartyAccountLinkedEvent(ThirdPartyAccountLinkedEvent $event)
 {
     $this->setThirdPartyUser($event->getThirdPartyAccount());
 }
 /**
  * @test
  */
 public function itShouldCreateTheEvent()
 {
     $event = new ThirdPartyAccountLinkedEvent($this->userId, $this->thirdPartyAccount);
     $this->assertEquals($this->userId, $event->getUserId());
     $this->assertEquals($this->thirdPartyAccount, $event->getThirdPartyAccount());
 }
 /**
  * @param ThirdPartyAccountLinkedEvent $event
  */
 public function handleThirdPartyAccountLinkedEvent(ThirdPartyAccountLinkedEvent $event)
 {
     $this->logger->info('Third party account linked event');
     $this->updateUserThirdPartyAccount($event->getUserId(), $event->getThirdPartyAccount());
 }