You are here

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

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

Overrides LingotekTestBase::setUp

File

tests/src/Functional/LingotekContentTypeTranslationTest.php, line 29

Class

LingotekContentTypeTranslationTest
Tests translating a content type.

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',
    'weight' => -5,
  ]);
  $this
    ->drupalPlaceBlock('local_tasks_block', [
    'region' => 'header',
    'weight' => -10,
  ]);

  // Create Article node types.
  $this
    ->drupalCreateContentType([
    'type' => 'article',
    'name' => 'Article',
  ]);
  $this
    ->saveLingotekConfigTranslationSettings([
    'node_type' => 'automatic',
  ]);

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