You are here

protected function DiffLocaleTest::setUp in Diff 8

Overrides DiffTestBase::setUp

File

tests/src/FunctionalJavascript/DiffLocaleTest.php, line 29

Class

DiffLocaleTest
Test diff functionality with localization and translation.

Namespace

Drupal\Tests\diff\FunctionalJavascript

Code

protected function setUp() {
  parent::setUp();
  $this
    ->drupalLogin($this->rootUser);

  // Add French language.
  $edit = array(
    'predefined_langcode' => 'fr',
  );
  $this
    ->drupalPostForm('admin/config/regional/language/add', $edit, t('Add language'));

  // Enable content translation on articles.
  $this
    ->drupalGet('admin/config/regional/content-language');
  $edit = array(
    'entity_types[node]' => TRUE,
    'settings[node][article][translatable]' => TRUE,
    'settings[node][article][settings][language][language_alterable]' => TRUE,
  );
  $this
    ->drupalPostForm(NULL, $edit, t('Save configuration'));
}