You are here

public function LocaleConfigTranslationTest::testOptionalConfiguration in Zircon Profile 8

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

Test translatability of optional configuration in locale.

File

core/modules/locale/src/Tests/LocaleConfigTranslationTest.php, line 203
Contains \Drupal\locale\Tests\LocaleConfigTranslationTest.

Class

LocaleConfigTranslationTest
Tests translation of configuration strings.

Namespace

Drupal\locale\Tests

Code

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

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

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