You are here

protected function LingotekSystemSiteLocaleTranslationTest::setUp in Lingotek Translation 3.4.x

Same name and namespace in other branches
  1. 8.2 tests/src/Functional/LingotekSystemSiteLocaleTranslationTest.php \Drupal\Tests\lingotek\Functional\LingotekSystemSiteLocaleTranslationTest::setUp()
  2. 4.0.x tests/src/Functional/LingotekSystemSiteLocaleTranslationTest.php \Drupal\Tests\lingotek\Functional\LingotekSystemSiteLocaleTranslationTest::setUp()
  3. 3.0.x tests/src/Functional/LingotekSystemSiteLocaleTranslationTest.php \Drupal\Tests\lingotek\Functional\LingotekSystemSiteLocaleTranslationTest::setUp()
  4. 3.1.x tests/src/Functional/LingotekSystemSiteLocaleTranslationTest.php \Drupal\Tests\lingotek\Functional\LingotekSystemSiteLocaleTranslationTest::setUp()
  5. 3.2.x tests/src/Functional/LingotekSystemSiteLocaleTranslationTest.php \Drupal\Tests\lingotek\Functional\LingotekSystemSiteLocaleTranslationTest::setUp()
  6. 3.3.x tests/src/Functional/LingotekSystemSiteLocaleTranslationTest.php \Drupal\Tests\lingotek\Functional\LingotekSystemSiteLocaleTranslationTest::setUp()
  7. 3.5.x tests/src/Functional/LingotekSystemSiteLocaleTranslationTest.php \Drupal\Tests\lingotek\Functional\LingotekSystemSiteLocaleTranslationTest::setUp()
  8. 3.6.x tests/src/Functional/LingotekSystemSiteLocaleTranslationTest.php \Drupal\Tests\lingotek\Functional\LingotekSystemSiteLocaleTranslationTest::setUp()
  9. 3.7.x tests/src/Functional/LingotekSystemSiteLocaleTranslationTest.php \Drupal\Tests\lingotek\Functional\LingotekSystemSiteLocaleTranslationTest::setUp()
  10. 3.8.x tests/src/Functional/LingotekSystemSiteLocaleTranslationTest.php \Drupal\Tests\lingotek\Functional\LingotekSystemSiteLocaleTranslationTest::setUp()

Overrides LingotekTestBase::setUp

File

tests/src/Functional/LingotekSystemSiteLocaleTranslationTest.php, line 26

Class

LingotekSystemSiteLocaleTranslationTest
Tests translating a node with multiple locales.

Namespace

Drupal\Tests\lingotek\Functional

Code

protected function setUp() : void {
  parent::setUp();

  // Place the actions and title block.
  $this
    ->drupalPlaceBlock('local_tasks_block');
  $this
    ->drupalPlaceBlock('page_title_block');

  // Add locales.
  ConfigurableLanguage::createFromLangcode('es')
    ->setThirdPartySetting('lingotek', 'locale', 'es_ES')
    ->save();
  ConfigurableLanguage::createFromLangcode('es-ar')
    ->setThirdPartySetting('lingotek', 'locale', 'es_AR')
    ->save();
  drupal_static_reset();
  \Drupal::entityTypeManager()
    ->clearCachedDefinitions();
  $this
    ->applyEntityUpdates();

  // Rebuild the container so that the new languages are picked up by services
  // that hold a list of languages.
  $this
    ->rebuildContainer();
}