function ConfigImportUITest::testConfigUninstallConfigException

Same name in other branches
  1. 9 core/modules/config/tests/src/Functional/ConfigImportUITest.php \Drupal\Tests\config\Functional\ConfigImportUITest::testConfigUninstallConfigException()
  2. 8.9.x core/modules/config/tests/src/Functional/ConfigImportUITest.php \Drupal\Tests\config\Functional\ConfigImportUITest::testConfigUninstallConfigException()
  3. 11.x core/modules/config/tests/src/Functional/ConfigImportUITest.php \Drupal\Tests\config\Functional\ConfigImportUITest::testConfigUninstallConfigException()

File

core/modules/config/tests/src/Functional/ConfigImportUITest.php, line 383

Class

ConfigImportUITest
Tests the user interface for importing configuration.

Namespace

Drupal\Tests\config\Functional

Code

public function testConfigUninstallConfigException() : void {
    $sync = $this->container
        ->get('config.storage.sync');
    $core_extension = $this->config('core.extension')
        ->get();
    unset($core_extension['module']['config']);
    $sync->write('core.extension', $core_extension);
    $this->drupalGet('admin/config/development/configuration');
    $this->assertSession()
        ->pageTextContains('core.extension');
    // Import and verify that both do not appear anymore.
    $this->submitForm([], 'Import all');
    $this->assertSession()
        ->pageTextContains('Can not uninstall the Configuration module as part of a configuration synchronization through the user interface.');
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.