Issue #3108021 by alexpott, lauriii: Set $defaultTheme for install profiles using configuration install

merge-requests/2419/head
catch 2020-01-29 09:53:17 +00:00
parent f6ee10b4b1
commit de6caed147
5 changed files with 7 additions and 20 deletions

View File

@ -416,6 +416,13 @@ trait FunctionalTestSetupTrait {
// Use the install profile to determine the default theme if configured and
// not already specified.
$profile = $container->getParameter('install_profile');
$default_sync_path = drupal_get_path('profile', $profile) . '/config/sync';
$profile_config_storage = new FileStorage($default_sync_path, StorageInterface::DEFAULT_COLLECTION);
if (!isset($this->defaultTheme) && $profile_config_storage->exists('system.theme')) {
$this->defaultTheme = $profile_config_storage->read('system.theme')['default'];
}
$default_install_path = drupal_get_path('profile', $profile) . '/' . InstallStorage::CONFIG_INSTALL_DIRECTORY;
$profile_config_storage = new FileStorage($default_install_path, StorageInterface::DEFAULT_COLLECTION);
if (!isset($this->defaultTheme) && $profile_config_storage->exists('system.theme')) {

View File

@ -9,11 +9,6 @@ namespace Drupal\FunctionalTests\Installer;
*/
class InstallerExistingConfigMultilingualTest extends InstallerExistingConfigTestBase {
/**
* {@inheritdoc}
*/
protected $defaultTheme = 'stark';
/**
* {@inheritdoc}
*/

View File

@ -9,11 +9,6 @@ namespace Drupal\FunctionalTests\Installer;
*/
class InstallerExistingConfigNoSystemSiteTest extends InstallerExistingConfigTestBase {
/**
* {@inheritdoc}
*/
protected $defaultTheme = 'stark';
/**
* {@inheritdoc}
*/

View File

@ -11,11 +11,6 @@ class InstallerExistingConfigProfileHookInstall extends InstallerExistingConfigT
protected $profile = 'config_profile_with_hook_install';
/**
* {@inheritdoc}
*/
protected $defaultTheme = 'stark';
/**
* {@inheritdoc}
*/

View File

@ -9,11 +9,6 @@ namespace Drupal\FunctionalTests\Installer;
*/
class InstallerExistingConfigTest extends InstallerExistingConfigTestBase {
/**
* {@inheritdoc}
*/
protected $defaultTheme = 'stark';
/**
* {@inheritdoc}
*/