function JsMessageTest::setUp

Same name and namespace in other branches
  1. 9 core/tests/Drupal/FunctionalJavascriptTests/Core/JsMessageTest.php \Drupal\FunctionalJavascriptTests\Core\JsMessageTest::setUp()
  2. 8.9.x core/tests/Drupal/FunctionalJavascriptTests/Core/JsMessageTest.php \Drupal\FunctionalJavascriptTests\Core\JsMessageTest::setUp()
  3. 11.x core/tests/Drupal/FunctionalJavascriptTests/Core/JsMessageTest.php \Drupal\FunctionalJavascriptTests\Core\JsMessageTest::setUp()

Overrides BrowserTestBase::setUp

1 call to JsMessageTest::setUp()
OliveroMessagesTest::setUp in core/tests/Drupal/FunctionalJavascriptTests/Theme/OliveroMessagesTest.php
1 method overrides JsMessageTest::setUp()
OliveroMessagesTest::setUp in core/tests/Drupal/FunctionalJavascriptTests/Theme/OliveroMessagesTest.php

File

core/tests/Drupal/FunctionalJavascriptTests/Core/JsMessageTest.php, line 30

Class

JsMessageTest
Tests core/drupal.message library.

Namespace

Drupal\FunctionalJavascriptTests\Core

Code

protected function setUp() : void {
  parent::setUp();
  // Enable the theme.
  \Drupal::service('theme_installer')->install([
    'test_messages',
  ]);
  $theme_config = \Drupal::configFactory()->getEditable('system.theme');
  $theme_config->set('default', 'test_messages');
  $theme_config->save();
}

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