Issue #2635784 by cilefen: setDefault() on ThemeHandler is not used in all the places it could
parent
92e7090454
commit
314de72dca
|
@ -266,7 +266,7 @@ class CKEditorTest extends KernelTestBase {
|
|||
|
||||
// Enable the Bartik theme, which specifies a CKEditor stylesheet.
|
||||
\Drupal::service('theme_handler')->install(['bartik']);
|
||||
$this->config('system.theme')->set('default', 'bartik')->save();
|
||||
\Drupal::service('theme_handler')->setDefault('bartik');
|
||||
$expected[] = file_create_url('core/themes/bartik/css/base/elements.css');
|
||||
$expected[] = file_create_url('core/themes/bartik/css/components/captions.css');
|
||||
$expected[] = file_create_url('core/themes/bartik/css/components/table.css');
|
||||
|
|
|
@ -120,7 +120,7 @@ class DisplayApiTest extends FieldUnitTestBase {
|
|||
$items = $this->entity->get($this->fieldName);
|
||||
|
||||
\Drupal::service('theme_handler')->install(['classy']);
|
||||
$this->config('system.theme')->set('default', 'classy')->save();
|
||||
\Drupal::service('theme_handler')->setDefault('classy');
|
||||
|
||||
// No display settings: check that default display settings are used.
|
||||
$build = $items->view();
|
||||
|
|
|
@ -66,7 +66,7 @@ class EntityReferenceFormatterTest extends EntityUnitTestBase {
|
|||
|
||||
// Use Classy theme for testing markup output.
|
||||
\Drupal::service('theme_handler')->install(['classy']);
|
||||
$this->config('system.theme')->set('default', 'classy')->save();
|
||||
\Drupal::service('theme_handler')->setDefault('classy');
|
||||
|
||||
// Grant the 'view test entity' permission.
|
||||
$this->installConfig(array('user'));
|
||||
|
|
|
@ -33,7 +33,7 @@ class NumberFieldRdfaTest extends FieldRdfaTestBase {
|
|||
*/
|
||||
public function testIntegerFormatterWithSettings() {
|
||||
\Drupal::service('theme_handler')->install(['classy']);
|
||||
$this->config('system.theme')->set('default', 'classy')->save();
|
||||
\Drupal::service('theme_handler')->setDefault('classy');
|
||||
$this->fieldType = 'integer';
|
||||
$formatter = array(
|
||||
'type' => 'number_integer',
|
||||
|
@ -76,7 +76,7 @@ class NumberFieldRdfaTest extends FieldRdfaTestBase {
|
|||
*/
|
||||
public function testFloatFormatterWithSettings() {
|
||||
\Drupal::service('theme_handler')->install(['classy']);
|
||||
$this->config('system.theme')->set('default', 'classy')->save();
|
||||
\Drupal::service('theme_handler')->setDefault('classy');
|
||||
$this->fieldType = 'float';
|
||||
$formatter = array(
|
||||
'type' => 'number_decimal',
|
||||
|
@ -126,7 +126,7 @@ class NumberFieldRdfaTest extends FieldRdfaTestBase {
|
|||
*/
|
||||
public function testFloatFormatterWithScaleExercised() {
|
||||
\Drupal::service('theme_handler')->install(['classy']);
|
||||
$this->config('system.theme')->set('default', 'classy')->save();
|
||||
\Drupal::service('theme_handler')->setDefault('classy');
|
||||
$this->fieldType = 'float';
|
||||
$formatter = array(
|
||||
'type' => 'number_decimal',
|
||||
|
@ -164,7 +164,7 @@ class NumberFieldRdfaTest extends FieldRdfaTestBase {
|
|||
*/
|
||||
public function testDecimalFormatterWithSettings() {
|
||||
\Drupal::service('theme_handler')->install(['classy']);
|
||||
$this->config('system.theme')->set('default', 'classy')->save();
|
||||
\Drupal::service('theme_handler')->setDefault('classy');
|
||||
$this->fieldType = 'decimal';
|
||||
$formatter = array(
|
||||
'type' => 'number_decimal',
|
||||
|
|
|
@ -109,7 +109,7 @@ class StandardProfileTest extends WebTestBase {
|
|||
|
||||
// Use Classy theme for testing markup output.
|
||||
\Drupal::service('theme_handler')->install(['classy']);
|
||||
$this->config('system.theme')->set('default', 'classy')->save();
|
||||
\Drupal::service('theme_handler')->setDefault('classy');
|
||||
|
||||
$this->baseUri = \Drupal::url('<front>', [], ['absolute' => TRUE]);
|
||||
|
||||
|
|
|
@ -52,7 +52,7 @@ class CurrentThemeConditionTest extends KernelTestBase {
|
|||
$this->assertTrue($condition_negated->execute());
|
||||
|
||||
// Set the expected theme to be used.
|
||||
$this->config('system.theme')->set('default', 'test_theme')->save();
|
||||
\Drupal::service('theme_handler')->setDefault('test_theme');
|
||||
\Drupal::theme()->resetActiveTheme();
|
||||
|
||||
$this->assertTrue($condition->execute());
|
||||
|
|
|
@ -98,7 +98,7 @@ class TableTest extends KernelTestBase {
|
|||
|
||||
// Enable the Classy theme.
|
||||
\Drupal::service('theme_handler')->install(['classy']);
|
||||
$this->config('system.theme')->set('default', 'classy')->save();
|
||||
\Drupal::service('theme_handler')->setDefault('classy');
|
||||
|
||||
$this->render($table);
|
||||
$this->removeWhiteSpace();
|
||||
|
|
|
@ -27,7 +27,7 @@ class MessageTest extends KernelTestBase {
|
|||
function testMessages() {
|
||||
// Enable the Classy theme.
|
||||
\Drupal::service('theme_handler')->install(['classy']);
|
||||
$this->config('system.theme')->set('default', 'classy')->save();
|
||||
\Drupal::service('theme_handler')->setDefault('classy');
|
||||
|
||||
drupal_set_message('An error occurred', 'error');
|
||||
drupal_set_message('But then something nice happened');
|
||||
|
|
|
@ -52,7 +52,7 @@ class StableThemeTest extends KernelTestBase {
|
|||
*/
|
||||
public function testStableIsDefault() {
|
||||
$this->themeHandler->install(['test_stable']);
|
||||
$this->config('system.theme')->set('default', 'test_stable')->save();
|
||||
$this->themeHandler->setDefault('test_stable');
|
||||
$theme = $this->themeManager->getActiveTheme();
|
||||
/** @var \Drupal\Core\Theme\ActiveTheme $base_theme */
|
||||
$base_themes = $theme->getBaseThemes();
|
||||
|
@ -65,7 +65,7 @@ class StableThemeTest extends KernelTestBase {
|
|||
*/
|
||||
public function testWildWest() {
|
||||
$this->themeHandler->install(['test_wild_west']);
|
||||
$this->config('system.theme')->set('default', 'test_wild_west')->save();
|
||||
$this->themeHandler->setDefault('test_wild_west');
|
||||
$theme = $this->themeManager->getActiveTheme();
|
||||
/** @var \Drupal\Core\Theme\ActiveTheme $base_theme */
|
||||
$base_themes = $theme->getBaseThemes();
|
||||
|
|
|
@ -31,7 +31,7 @@ class TwigDebugMarkupTest extends WebTestBase {
|
|||
$renderer = $this->container->get('renderer');
|
||||
$extension = twig_extension();
|
||||
\Drupal::service('theme_handler')->install(array('test_theme'));
|
||||
$this->config('system.theme')->set('default', 'test_theme')->save();
|
||||
\Drupal::service('theme_handler')->setDefault('test_theme');
|
||||
$this->drupalCreateContentType(array('type' => 'page'));
|
||||
// Enable debug, rebuild the service container, and clear all caches.
|
||||
$parameters = $this->container->getParameter('twig.config');
|
||||
|
|
|
@ -54,7 +54,7 @@ class TwigTransTest extends WebTestBase {
|
|||
|
||||
// Setup test_theme.
|
||||
\Drupal::service('theme_handler')->install(array('test_theme'));
|
||||
$this->config('system.theme')->set('default', 'test_theme')->save();
|
||||
\Drupal::service('theme_handler')->setDefault('test_theme');
|
||||
|
||||
// Create and log in as admin.
|
||||
$this->adminUser = $this->drupalCreateUser(array(
|
||||
|
|
Loading…
Reference in New Issue