Sets up unit test environment.
Unlike Drupal\simpletest\WebTestBase::setUp(), UnitTestBase::setUp() does not install modules because tests are performed without accessing the database. Any required files must be explicitly included by the child class setUp() method.
Overrides UnitTestBase::setUp
function setUp() {
parent::setUp();
global $conf;
$conf['php_storage']['service_container'] = array(
'bin' => 'service_container',
'class' => 'Drupal\\Component\\PhpStorage\\MTimeProtectedFileStorage',
'directory' => DRUPAL_ROOT . '/' . $this->public_files_directory . '/php',
'secret' => drupal_get_hash_salt(),
);
// Use a non-persistent cache to avoid queries to non-existing tables.
$this
->settingsSet('cache', array(
'default' => 'cache.backend.memory',
));
}