protected function LingotekManagementTestTrait::assertNoLingotekUploadLink in Lingotek Translation 3.0.x
Same name and namespace in other branches
- 8.2 tests/src/Functional/LingotekManagementTestTrait.php \Drupal\Tests\lingotek\Functional\LingotekManagementTestTrait::assertNoLingotekUploadLink()
- 4.0.x tests/src/Functional/LingotekManagementTestTrait.php \Drupal\Tests\lingotek\Functional\LingotekManagementTestTrait::assertNoLingotekUploadLink()
- 3.1.x tests/src/Functional/LingotekManagementTestTrait.php \Drupal\Tests\lingotek\Functional\LingotekManagementTestTrait::assertNoLingotekUploadLink()
- 3.2.x tests/src/Functional/LingotekManagementTestTrait.php \Drupal\Tests\lingotek\Functional\LingotekManagementTestTrait::assertNoLingotekUploadLink()
- 3.3.x tests/src/Functional/LingotekManagementTestTrait.php \Drupal\Tests\lingotek\Functional\LingotekManagementTestTrait::assertNoLingotekUploadLink()
- 3.4.x tests/src/Functional/LingotekManagementTestTrait.php \Drupal\Tests\lingotek\Functional\LingotekManagementTestTrait::assertNoLingotekUploadLink()
- 3.5.x tests/src/Functional/LingotekManagementTestTrait.php \Drupal\Tests\lingotek\Functional\LingotekManagementTestTrait::assertNoLingotekUploadLink()
- 3.6.x tests/src/Functional/LingotekManagementTestTrait.php \Drupal\Tests\lingotek\Functional\LingotekManagementTestTrait::assertNoLingotekUploadLink()
- 3.7.x tests/src/Functional/LingotekManagementTestTrait.php \Drupal\Tests\lingotek\Functional\LingotekManagementTestTrait::assertNoLingotekUploadLink()
- 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\FunctionalCode
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);
}