Ejemplo n.º 1
0
 public function testWarningToSession()
 {
     $this->_ntf->warningToSession('Warning test');
     $this->_ntf = new NotificationManager();
     $data = $this->_ntf->data;
     $this->assertCount(1, $data);
     $this->assertInstanceOf(Notification::class, $data[0]);
     $this->assertEquals('Тест предупреждения', $data[0]->message);
     $this->assertEquals(Notification::WARNING, $data[0]->type);
 }
Ejemplo n.º 2
0
 /**
  * Copies all warnings from other notification manager.
  * @param NotificationManager $manager
  */
 public function copyWarnings($manager)
 {
     $this->_data = array_merge($this->_data, $manager->getWarnings());
 }