Sets up Drupal unit test environment.
Overrides DrupalUnitTestBase::setUp
DrupalUnitTestBase::$modules
function setUp() {
parent::setUp();
$this
->installSchema('system', 'config_snapshot');
config_install_default_config('module', 'config_test');
// Installing config_test's default configuration pollutes the global
// variable being used for recording hook invocations by this test already,
// so it has to be cleared out manually.
unset($GLOBALS['hook_config_test']);
// Set up the ConfigImporter object for testing.
$config_comparer = new StorageComparer($this->container
->get('config.storage.staging'), $this->container
->get('config.storage'));
$this->configImporter = new ConfigImporter($config_comparer
->createChangelist(), $this->container
->get('event_dispatcher'), $this->container
->get('config.factory'), $this->container
->get('plugin.manager.entity'), $this->container
->get('lock'));
$this
->copyConfig($this->container
->get('config.storage'), $this->container
->get('config.storage.staging'));
}