public function testErrorToSession() { $this->_ntf->errorToSession('Error 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::ERROR, $data[0]->type); }