How to connect database in UnitTestCase subclass? I know there are mockups, data providers, bla bla bla.
I don't care now, I just want to connect to my dev site db and use nodes, terms for unit tests.

How can I do it? In D7 it was very simple in plain PHPUnit, what about D8?

I've tried bootstrap D8, but failed.
See https://www.drupal.org/phpunit for better documentation.

There are 4 test base classes:


UnitTestBase, pure unit tests where everything but your code has to be mocked and only supports classes
KernelTestBase, which provide a basic in-memory drupal environment. Much faster than browser tests but more tedious to set up, you have to explicitly install tables you need and depend on all modules you need explicitly
BrowserTestBase, the replacement for WebTestBase, better apis (uses mink and so on) but just as slow.
JavaScriptTestBase, phantomjs based JS tests, even slower but can actually execute JS.