Exemplo n.º 1
0
 public function testMessagesFiltering()
 {
     $notifications = new Notification\Stack();
     $message = new Notification\Info('hello');
     $notifications->addMessage('x.y', $message);
     $notifications->addMessage('x.z', $message);
 }
Exemplo n.º 2
0
 public function testMessageCounting()
 {
     $notifications = new Notification\Stack();
     $notifications->addMessage(uniqid(), new Notification\Info(uniqid()));
     $notifications->addMessage(uniqid(), new Notification\Info(uniqid()));
     $notifications->addMessage(uniqid(), new Notification\Alert(uniqid()));
     $notifications->addMessage(uniqid(), new Notification\Info(uniqid()));
     $this->assertEquals(3, $notifications->count('info'));
     $this->assertEquals(1, $notifications->count('danger'));
 }