You are here

protected function LingotekInterfaceTranslationTest::setUp in Lingotek Translation 3.2.x

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

Overrides LingotekTestBase::setUp

File

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

Class

LingotekInterfaceTranslationTest
Tests translating the user interface using the Lingotek form.

Namespace

Drupal\Tests\lingotek\Functional

Code

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

  // Place the actions and title block.
  $this
    ->drupalPlaceBlock('page_title_block', [
    'region' => 'content',
    'weight' => -5,
  ]);
  $this
    ->drupalPlaceBlock('local_tasks_block', [
    'region' => 'content',
    'weight' => -10,
  ]);
  \Drupal::state()
    ->set('lingotek.uploaded_content_type', 'interface-translation');

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