You are here

public function LocaleConfigTranslationTest::testOptionalConfiguration in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/locale/tests/src/Functional/LocaleConfigTranslationTest.php \Drupal\Tests\locale\Functional\LocaleConfigTranslationTest::testOptionalConfiguration()

Tests translatability of optional configuration in locale.

File

core/modules/locale/tests/src/Functional/LocaleConfigTranslationTest.php, line 226

Class

LocaleConfigTranslationTest
Tests translation of configuration strings.

Namespace

Drupal\Tests\locale\Functional

Code

public function testOptionalConfiguration() {
  $this
    ->assertNodeConfig(FALSE, FALSE);

  // Enable the node module.
  $this
    ->drupalGet('admin/modules');
  $this
    ->submitForm([
    'modules[node][enable]' => "1",
  ], 'Install');
  $this
    ->submitForm([], 'Continue');
  $this
    ->rebuildContainer();
  $this
    ->assertNodeConfig(TRUE, FALSE);

  // Enable the views module (which node provides some optional config for).
  $this
    ->drupalGet('admin/modules');
  $this
    ->submitForm([
    'modules[views][enable]' => "1",
  ], 'Install');
  $this
    ->rebuildContainer();
  $this
    ->assertNodeConfig(TRUE, TRUE);
}