You are here

public function LingotekNodeBulkTranslationTest::testDeleteTranslationsInBulk in Lingotek Translation 8.2

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

Tests that translations can be deleted using the actions on the management page.

File

tests/src/Functional/LingotekNodeBulkTranslationTest.php, line 2870

Class

LingotekNodeBulkTranslationTest
Tests translating a node using the bulk management form.

Namespace

Drupal\Tests\lingotek\Functional

Code

public function testDeleteTranslationsInBulk() {
  if ((double) \Drupal::VERSION < 8.6) {
    $this
      ->markTestSkipped("This test doesn't apply for this version of Drupal Core.");
  }
  $this
    ->testNodeTranslationUsingActionsForMultipleLocales();

  // Add a language.
  ConfigurableLanguage::createFromLangcode('ca')
    ->setThirdPartySetting('lingotek', 'locale', 'ca_ES')
    ->save();
  $this
    ->goToContentBulkManagementForm();
  $this
    ->assertLingotekRequestTranslationLink('ca_ES');
  $key = $this
    ->getBulkSelectionKey('en', 1);
  $edit = [
    $key => TRUE,
    $this
      ->getBulkOperationFormName() => $this
      ->getBulkOperationNameForDeleteTranslations('node'),
  ];
  $this
    ->drupalPostForm(NULL, $edit, $this
    ->getApplyActionsButtonLabel());
  $this
    ->confirmBulkDeleteTranslations(1, 2);
  $this
    ->assertLingotekDownloadTargetLink('es_MX');
  $this
    ->assertLingotekDownloadTargetLink('de_AT');
}