You are here

protected function LingotekSystemSiteTranslationTest::setUp in Lingotek Translation 3.1.x

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

Overrides LingotekTestBase::setUp

File

tests/src/Functional/LingotekSystemSiteTranslationTest.php, line 22

Class

LingotekSystemSiteTranslationTest
Tests translating a config object.

Namespace

Drupal\Tests\lingotek\Functional

Code

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

  // Place the actions and title block.
  $this
    ->drupalPlaceBlock('page_title_block', [
    'region' => 'header',
  ]);
  $this
    ->drupalPlaceBlock('local_tasks_block', [
    'region' => 'header',
  ]);

  // Place branding block with site name and slogan into header region.
  $this
    ->drupalPlaceBlock('system_branding_block', [
    'region' => 'header',
  ]);

  // Add a language.
  ConfigurableLanguage::createFromLangcode('es')
    ->setThirdPartySetting('lingotek', 'locale', 'es_AR')
    ->save();

  // This is a hack for avoiding writing different lingotek endpoint mocks.
  \Drupal::state()
    ->set('lingotek.uploaded_content_type', 'system.site');
}