public function testCopyWarnings() { $this->_ntf->error('Error test'); $ntf2 = new NotificationManager(); $ntf2->error('Error2 test'); $ntf2->message('Message test'); $ntf2->warning('Warning test'); $this->_ntf->copyWarnings($ntf2); $data = $this->_ntf->data; $this->assertCount(2, $data); $this->assertInstanceOf(Notification::class, $data[0]); $this->assertEquals('Тест ошибки', $data[0]->message); $this->assertEquals(Notification::ERROR, $data[0]->type); $this->assertInstanceOf(Notification::class, $data[1]); $this->assertEquals('Тест предупреждения', $data[1]->message); $this->assertEquals(Notification::WARNING, $data[1]->type); }