protected function LingotekManagementTestTrait::assertLingotekUpdateLink in Lingotek Translation 4.0.x
Same name and namespace in other branches
- 8.2 tests/src/Functional/LingotekManagementTestTrait.php \Drupal\Tests\lingotek\Functional\LingotekManagementTestTrait::assertLingotekUpdateLink()
- 3.0.x tests/src/Functional/LingotekManagementTestTrait.php \Drupal\Tests\lingotek\Functional\LingotekManagementTestTrait::assertLingotekUpdateLink()
- 3.1.x tests/src/Functional/LingotekManagementTestTrait.php \Drupal\Tests\lingotek\Functional\LingotekManagementTestTrait::assertLingotekUpdateLink()
- 3.2.x tests/src/Functional/LingotekManagementTestTrait.php \Drupal\Tests\lingotek\Functional\LingotekManagementTestTrait::assertLingotekUpdateLink()
- 3.3.x tests/src/Functional/LingotekManagementTestTrait.php \Drupal\Tests\lingotek\Functional\LingotekManagementTestTrait::assertLingotekUpdateLink()
- 3.4.x tests/src/Functional/LingotekManagementTestTrait.php \Drupal\Tests\lingotek\Functional\LingotekManagementTestTrait::assertLingotekUpdateLink()
- 3.5.x tests/src/Functional/LingotekManagementTestTrait.php \Drupal\Tests\lingotek\Functional\LingotekManagementTestTrait::assertLingotekUpdateLink()
- 3.6.x tests/src/Functional/LingotekManagementTestTrait.php \Drupal\Tests\lingotek\Functional\LingotekManagementTestTrait::assertLingotekUpdateLink()
- 3.7.x tests/src/Functional/LingotekManagementTestTrait.php \Drupal\Tests\lingotek\Functional\LingotekManagementTestTrait::assertLingotekUpdateLink()
- 3.8.x tests/src/Functional/LingotekManagementTestTrait.php \Drupal\Tests\lingotek\Functional\LingotekManagementTestTrait::assertLingotekUpdateLink()
Asserts there is a link for updating the content.
Parameters
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.
2 calls to LingotekManagementTestTrait::assertLingotekUpdateLink()
- LingotekNodeBulkTranslationTest::testCheckSourceStatusNotCompletedAndUploadedLongAgo in tests/
src/ Functional/ LingotekNodeBulkTranslationTest.php - Tests that all the statuses are set when using the Check Translations action.
- LingotekNodeTranslationFlowNotCurrentToPendingTest::testNodeTargetStatusAfterSourceEditAndUpload in tests/
src/ Functional/ LingotekNodeTranslationFlowNotCurrentToPendingTest.php - Tests that a node can be translated.
File
- tests/
src/ Functional/ LingotekManagementTestTrait.php, line 62
Class
- LingotekManagementTestTrait
- Trait with Lingotek management form helpers.
Namespace
Drupal\Tests\lingotek\FunctionalCode
protected function assertLingotekUpdateLink($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/update/' . $document_id;
if ($destination = $this
->getDestination($destination_entity_type_id, $prefix)) {
$href .= $destination;
}
$this
->assertLinkByHref($href);
}