diff --git a/core/modules/config/lib/Drupal/config/Tests/ConfigImportAllTest.php b/core/modules/config/lib/Drupal/config/Tests/ConfigImportAllTest.php index 038e318..ade406b 100644 --- a/core/modules/config/lib/Drupal/config/Tests/ConfigImportAllTest.php +++ b/core/modules/config/lib/Drupal/config/Tests/ConfigImportAllTest.php @@ -29,6 +29,13 @@ public static function getInfo() { ); } + public function setUp() { + parent::setUp(); + + $this->web_user = $this->drupalCreateUser(array('synchronize configuration')); + $this->drupalLogin($this->web_user); + } + /** * Tests that a fixed set of modules can be installed and uninstalled. */ @@ -81,6 +88,9 @@ public function testInstallUninstall() { return TRUE; }); + // Can not uninstall config and use admin/config/development/configuration! + unset($modules_to_uninstall['config']); + $this->assertTrue(isset($modules_to_uninstall['comment']), 'The comment module will be disabled'); // Uninstall all modules that can be uninstalled. @@ -93,7 +103,7 @@ public function testInstallUninstall() { } // Import the configuration thereby re-installing all the modules. - $this->configImporter()->import(); + $this->drupalPostForm('admin/config/development/configuration', array(), t('Import all')); // Check that all modules that were uninstalled are now reinstalled. $this->assertModules(array_keys($modules_to_uninstall), TRUE);