function LocaleConfigTranslationTest::testOptionalConfiguration

Same name in other branches
  1. 8.9.x core/modules/locale/tests/src/Functional/LocaleConfigTranslationTest.php \Drupal\Tests\locale\Functional\LocaleConfigTranslationTest::testOptionalConfiguration()
  2. 10 core/modules/locale/tests/src/Functional/LocaleConfigTranslationTest.php \Drupal\Tests\locale\Functional\LocaleConfigTranslationTest::testOptionalConfiguration()
  3. 11.x 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 231

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);
}

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