public function testEvent()
 {
     $event = new NotificationEvent();
     $event->setMessage('my message');
     $this->assertEquals('my message', $event->getMessage());
 }
Example #2
0
 /**
  * Add a notification to the subscriber.
  *
  * @param $message
  */
 protected function addNotification($message)
 {
     $event = new NotificationEvent();
     $event->setMessage($message);
     $this->eventDispatcher->dispatch(NotificationEvent::NAME, $event);
 }