You are here

protected function LingotekManagementTestTrait::assertNoLingotekUploadLink in Lingotek Translation 3.6.x

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

Asserts there is no link for uploading the content.

Parameters

int|string $entity_id: The entity ID. Optional, defaults to 1.

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

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

File

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

Class

LingotekManagementTestTrait
Trait with Lingotek management form helpers.

Namespace

Drupal\Tests\lingotek\Functional

Code

protected function assertNoLingotekUploadLink($entity_id = 1, $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/upload/' . $entity_type_id . '/' . $entity_id;
  if ($destination = $this
    ->getDestination($destination_entity_type_id, $prefix)) {
    $href .= $destination;
  }
  $this
    ->assertNoLinkByHref($href);
}