function TranslatedViewTest::setUp

Same name in other branches
  1. 8.9.x core/modules/views_ui/tests/src/Functional/TranslatedViewTest.php \Drupal\Tests\views_ui\Functional\TranslatedViewTest::setUp()
  2. 10 core/modules/views_ui/tests/src/Functional/TranslatedViewTest.php \Drupal\Tests\views_ui\Functional\TranslatedViewTest::setUp()
  3. 11.x core/modules/views_ui/tests/src/Functional/TranslatedViewTest.php \Drupal\Tests\views_ui\Functional\TranslatedViewTest::setUp()

Overrides UITestBase::setUp

File

core/modules/views_ui/tests/src/Functional/TranslatedViewTest.php, line 48

Class

TranslatedViewTest
Tests that translated strings in views UI don't override original strings.

Namespace

Drupal\Tests\views_ui\Functional

Code

protected function setUp($import_test_views = TRUE, $modules = []) : void {
    parent::setUp($import_test_views, $modules);
    $permissions = [
        'administer site configuration',
        'administer views',
        'translate configuration',
        'translate interface',
    ];
    // Create and log in user.
    $this->adminUser = $this->drupalCreateUser($permissions);
    $this->drupalLogin($this->adminUser);
    // Add languages.
    foreach ($this->langcodes as $langcode) {
        ConfigurableLanguage::createFromLangcode($langcode)->save();
    }
    $this->resetAll();
    $this->rebuildContainer();
}

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