X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=web%2Fcore%2Fmodules%2Fconfig%2Fsrc%2FTests%2FConfigImportInstallProfileTest.php;fp=web%2Fcore%2Fmodules%2Fconfig%2Fsrc%2FTests%2FConfigImportInstallProfileTest.php;h=0000000000000000000000000000000000000000;hp=eaece36db3adcff323b12d6a26912001acba5fea;hb=9917807b03b64faf00f6a1f29dcb6eafc454efa5;hpb=aea91e65e895364e460983b890e295aa5d5540a5 diff --git a/web/core/modules/config/src/Tests/ConfigImportInstallProfileTest.php b/web/core/modules/config/src/Tests/ConfigImportInstallProfileTest.php deleted file mode 100644 index eaece36db..000000000 --- a/web/core/modules/config/src/Tests/ConfigImportInstallProfileTest.php +++ /dev/null @@ -1,80 +0,0 @@ -webUser = $this->drupalCreateUser(['synchronize configuration']); - $this->drupalLogin($this->webUser); - $this->copyConfig($this->container->get('config.storage'), $this->container->get('config.storage.sync')); - } - - /** - * Tests config importer cannot uninstall install profiles. - * - * @see \Drupal\Core\EventSubscriber\ConfigImportSubscriber - */ - public function testInstallProfileValidation() { - $sync = $this->container->get('config.storage.sync'); - $this->copyConfig($this->container->get('config.storage'), $sync); - $core = $sync->read('core.extension'); - - // Ensure install profiles can not be uninstalled. - unset($core['module']['testing_config_import']); - $sync->write('core.extension', $core); - - $this->drupalPostForm('admin/config/development/configuration', [], t('Import all')); - $this->assertText('The configuration cannot be imported because it failed validation for the following reasons:'); - $this->assertText('Unable to uninstall the Testing config import profile since it is the install profile.'); - - // Uninstall dependencies of testing_config_import. - $core['module']['testing_config_import'] = 0; - unset($core['module']['syslog']); - unset($core['theme']['stark']); - $core['theme']['stable'] = 0; - $core['theme']['classy'] = 0; - $sync->write('core.extension', $core); - $sync->deleteAll('syslog.'); - $theme = $sync->read('system.theme'); - $theme['default'] = 'classy'; - $sync->write('system.theme', $theme); - $this->drupalPostForm('admin/config/development/configuration', [], t('Import all')); - $this->assertText('The configuration was imported successfully.'); - $this->rebuildContainer(); - $this->assertFalse(\Drupal::moduleHandler()->moduleExists('syslog'), 'The syslog module has been uninstalled.'); - $this->assertFalse(\Drupal::service('theme_handler')->themeExists('stark'), 'The stark theme has been uninstalled.'); - $this->assertTrue(\Drupal::service('theme_handler')->themeExists('classy'), 'The classy theme has been installed.'); - } - -}