You are here

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

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

Overrides LingotekTestBase::setUp

File

tests/src/Functional/LingotekConfigEntityStatusDownloadTargetTest.php, line 21

Class

LingotekConfigEntityStatusDownloadTargetTest
Tests translating a field using the bulk management form.

Namespace

Drupal\Tests\lingotek\Functional

Code

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

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

  // Add a language.
  ConfigurableLanguage::createFromLangcode('es')
    ->setThirdPartySetting('lingotek', 'locale', 'es_MX')
    ->save();
  $this
    ->saveLingotekConfigTranslationSettings([
    'node_fields' => 'automatic',
  ]);

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