コード例 #1
0
 function it_shares_the_notifications_from_the_session(Notifier $notifier, Factory $viewFactory, Request $request)
 {
     $notifications = Notifications::mapFromArray([]);
     $notifier->getCurrentNotifications()->willReturn($notifications);
     $viewFactory->share('notifications', $notifications)->shouldBeCalled();
     $next = function ($req) use($request) {
         return $req === $request->getWrappedObject();
     };
     $this->handle($request, $next)->shouldBe(true);
 }
コード例 #2
0
ファイル: SessionTransport.php プロジェクト: rojtjo/notifier
 /**
  * @return Notifications
  */
 public function getCurrentNotifications()
 {
     $notifications = $this->session->get($this->currentKey());
     return Notifications::mapFromArray($notifications);
 }