コード例 #1
0
 /**
  * Notify action
  *
  * @param \DERHANSEN\SfEventMgt\Domain\Model\Event $event Event
  * @param string $customNotification CustomNotification
  *
  * @return void
  */
 public function notifyAction(Event $event, $customNotification)
 {
     $customNotifications = $this->settingsService->getCustomNotifications($this->settings);
     $result = $this->notificationService->sendCustomNotification($event, $customNotification, $this->settings);
     $this->notificationService->createCustomNotificationLogentry($event, $customNotifications[$customNotification], $result);
     $this->redirect('list', 'Administration', 'SfEventMgt', array('demand' => NULL, 'messageId' => 2));
 }
コード例 #2
0
 /**
  * @test
  * @return void
  */
 public function createCustomNotificationLogentryCreatesLog()
 {
     $mockLogRepo = $this->getMock('DERHANSEN\\SfEventMgt\\Domain\\Repository\\CustomNotificationRepository', array('add'), array(), '', FALSE);
     $mockLogRepo->expects($this->once())->method('add');
     $this->inject($this->subject, 'customNotificationLogRepository', $mockLogRepo);
     $event = new \DERHANSEN\SfEventMgt\Domain\Model\Event();
     $this->subject->createCustomNotificationLogentry($event, 'A description', 1);
 }