$this->
rebuildContainer();
// Verify site name has changed.
$this->
assertSame($new_site_name,
$this->
config('system.site'
)->
get('name'
));
// Verify that new config entity exists.
$this->
assertSame($original_dynamic_data,
$this->
config($dynamic_name)->
get());
// Verify the cache got cleared.
$this->
assertTrue(isset($GLOBALS['hook_cache_flush'
]));
$this->
rebuildContainer();
$this->
assertTrue(\Drupal::
moduleHandler()->
moduleExists('ban'
), 'Ban module installed during import.'
);
$this->
assertTrue(\Drupal::
database()->
schema()->
tableExists('ban_ip'
), 'The database table ban_ip exists.'
);
$this->
assertTrue(\Drupal::
moduleHandler()->
moduleExists('automated_cron'
), 'Automated Cron module installed during import.'
);
$this->
assertTrue(\Drupal::
moduleHandler()->
moduleExists('options'
), 'Options module installed during import.'
);
$this->
assertTrue(\Drupal::
moduleHandler()->
moduleExists('text'
), 'Text module installed during import.'
);
$this->
assertTrue(\Drupal::
service('theme_handler'
)->
themeExists('olivero'
), 'Olivero theme installed during import.'
);
// Ensure installations and uninstallation occur as expected.
$installed = \Drupal::
state()->
get('ConfigImportUITest.core.extension.modules_installed',
[]);
$uninstalled = \Drupal::
state()->
get('ConfigImportUITest.core.extension.modules_uninstalled',
[]);
$expected =
['automated_cron', 'ban', 'text', 'options'
];
$this->
assertSame($expected,
$installed, 'Automated Cron, Ban, Text and Options modules installed in the correct order.'
);