public function testGetErrors() { $this->_ntf->error('Error test'); $this->_ntf->error('Error test', true); $data = $this->_ntf->errors; $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('Error test', $data[1]->message); $this->assertEquals(Notification::ERROR, $data[1]->type); }