You are here

public function LingotekNodeBulkTranslationTest::testDeleteTranslationsInBulk in Lingotek Translation 3.4.x

Same name and namespace in other branches
  1. 8.2 tests/src/Functional/LingotekNodeBulkTranslationTest.php \Drupal\Tests\lingotek\Functional\LingotekNodeBulkTranslationTest::testDeleteTranslationsInBulk()
  2. 4.0.x tests/src/Functional/LingotekNodeBulkTranslationTest.php \Drupal\Tests\lingotek\Functional\LingotekNodeBulkTranslationTest::testDeleteTranslationsInBulk()
  3. 3.0.x tests/src/Functional/LingotekNodeBulkTranslationTest.php \Drupal\Tests\lingotek\Functional\LingotekNodeBulkTranslationTest::testDeleteTranslationsInBulk()
  4. 3.1.x tests/src/Functional/LingotekNodeBulkTranslationTest.php \Drupal\Tests\lingotek\Functional\LingotekNodeBulkTranslationTest::testDeleteTranslationsInBulk()
  5. 3.2.x tests/src/Functional/LingotekNodeBulkTranslationTest.php \Drupal\Tests\lingotek\Functional\LingotekNodeBulkTranslationTest::testDeleteTranslationsInBulk()
  6. 3.3.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 2952

Class

LingotekNodeBulkTranslationTest
Tests translating a node using the bulk management form.

Namespace

Drupal\Tests\lingotek\Functional

Code

public function testDeleteTranslationsInBulk() {
  $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');
}