You are here

protected function LingotekManagementTestTrait::assertNoLingotekDownloadTargetLink in Lingotek Translation 3.3.x

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

Asserts there is NOT a link for downloading the translation for a given locale.

Parameters

string $locale: The locale.

string $document_id: The Lingotek document ID. Optional, defaults to 'dummy-document-hash-id'.

string $entity_type_id: The entity type ID. Optional, defaults to node.

string|null $prefix: Language prefix if any. Optional, defaults to NULL.

4 calls to LingotekManagementTestTrait::assertNoLingotekDownloadTargetLink()
LingotekEntityTestBulkTranslationTest::testCheckTranslationsAction in tests/src/Functional/LingotekEntityTestBulkTranslationTest.php
Tests that all the statuses are set when using the Check Translations action.
LingotekNodeBulkTranslationTest::testCheckTranslationsAction in tests/src/Functional/LingotekNodeBulkTranslationTest.php
Tests that all the statuses are set when using the Check Translations action.
LingotekNodeBulkTranslationTest::testDeleteMissingTranslation in tests/src/Functional/LingotekNodeBulkTranslationTest.php
Tests that translations can be deleted using the actions on the management page.
LingotekNodeBulkTranslationTest::testDeleteTranslation in tests/src/Functional/LingotekNodeBulkTranslationTest.php
Tests that translations can be deleted using the actions on the management page.

File

tests/src/Functional/LingotekManagementTestTrait.php, line 242

Class

LingotekManagementTestTrait
Trait with Lingotek management form helpers.

Namespace

Drupal\Tests\lingotek\Functional

Code

protected function assertNoLingotekDownloadTargetLink($locale, $document_id = 'dummy-document-hash-id', $entity_type_id = 'node', $prefix = NULL, $destination_entity_type_id = NULL, $destination_entity_id = NULL) {
  $basepath = \Drupal::request()
    ->getBasePath();
  $languagePrefix = $prefix === NULL ? '' : '/' . $prefix;
  $destination_entity_type_id = $destination_entity_type_id ?: $entity_type_id;
  $href = $basepath . $languagePrefix . '/admin/lingotek/entity/download/' . $document_id . '/' . $locale;
  if ($destination = $this
    ->getDestination($destination_entity_type_id, $prefix)) {
    $href .= $destination;
  }
  $this
    ->assertNoLinkByHref($href);
}