Esempio n. 1
0
 function it_can_get_the_current_notifications()
 {
     $notification = Notification::success('It was successful');
     $this->send($notification);
     $this->getCurrentNotifications()->shouldBe([]);
 }
Esempio n. 2
0
 function it_can_send_a_notification(Transport $transport)
 {
     $notification = Notification::success('It was successful');
     $transport->send($notification)->shouldBeCalled();
     $this->send($notification);
 }
Esempio n. 3
0
 function it_sends_the_notifications_to_the_session_store(SessionStore $session)
 {
     $notification = Notification::success('It was successful');
     $session->push('my-key.new', ['type' => $notification->getType(), 'message' => $notification->getMessage()])->shouldBeCalled();
     $this->send($notification);
 }
Esempio n. 4
0
 function let()
 {
     $this->beConstructedWith([Notification::success('It is successful'), Notification::error('It is an error')]);
 }
 /**
  * @return Notifications
  */
 private function createNotifications()
 {
     return new Notifications([Notification::success('It is successful'), Notification::error('It is an error'), Notification::warning('It is a warning'), Notification::info('It is info')]);
 }