protected function LingotekFieldBodyBulkTranslationTest::assertLingotekCheckSourceStatusLink in Lingotek Translation 3.7.x
Same name and namespace in other branches
- 8.2 tests/src/Functional/LingotekFieldBodyBulkTranslationTest.php \Drupal\Tests\lingotek\Functional\LingotekFieldBodyBulkTranslationTest::assertLingotekCheckSourceStatusLink()
- 4.0.x tests/src/Functional/LingotekFieldBodyBulkTranslationTest.php \Drupal\Tests\lingotek\Functional\LingotekFieldBodyBulkTranslationTest::assertLingotekCheckSourceStatusLink()
- 3.0.x tests/src/Functional/LingotekFieldBodyBulkTranslationTest.php \Drupal\Tests\lingotek\Functional\LingotekFieldBodyBulkTranslationTest::assertLingotekCheckSourceStatusLink()
- 3.1.x tests/src/Functional/LingotekFieldBodyBulkTranslationTest.php \Drupal\Tests\lingotek\Functional\LingotekFieldBodyBulkTranslationTest::assertLingotekCheckSourceStatusLink()
- 3.2.x tests/src/Functional/LingotekFieldBodyBulkTranslationTest.php \Drupal\Tests\lingotek\Functional\LingotekFieldBodyBulkTranslationTest::assertLingotekCheckSourceStatusLink()
- 3.3.x tests/src/Functional/LingotekFieldBodyBulkTranslationTest.php \Drupal\Tests\lingotek\Functional\LingotekFieldBodyBulkTranslationTest::assertLingotekCheckSourceStatusLink()
- 3.4.x tests/src/Functional/LingotekFieldBodyBulkTranslationTest.php \Drupal\Tests\lingotek\Functional\LingotekFieldBodyBulkTranslationTest::assertLingotekCheckSourceStatusLink()
- 3.5.x tests/src/Functional/LingotekFieldBodyBulkTranslationTest.php \Drupal\Tests\lingotek\Functional\LingotekFieldBodyBulkTranslationTest::assertLingotekCheckSourceStatusLink()
- 3.6.x tests/src/Functional/LingotekFieldBodyBulkTranslationTest.php \Drupal\Tests\lingotek\Functional\LingotekFieldBodyBulkTranslationTest::assertLingotekCheckSourceStatusLink()
- 3.8.x tests/src/Functional/LingotekFieldBodyBulkTranslationTest.php \Drupal\Tests\lingotek\Functional\LingotekFieldBodyBulkTranslationTest::assertLingotekCheckSourceStatusLink()
Asserts there is a link for checking the content source status.
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.
Overrides LingotekManagementTestTrait::assertLingotekCheckSourceStatusLink
18 calls to LingotekFieldBodyBulkTranslationTest::assertLingotekCheckSourceStatusLink()
- LingotekFieldBodyBulkTranslationTest::testCheckSourceStatusCompletedAndContentMissing in tests/
src/ Functional/ LingotekFieldBodyBulkTranslationTest.php - Test that we handle errors in update.
- LingotekFieldBodyBulkTranslationTest::testCheckSourceStatusNotCompletedAndStillImporting in tests/
src/ Functional/ LingotekFieldBodyBulkTranslationTest.php - Test that we handle errors in update.
- LingotekFieldBodyBulkTranslationTest::testCheckSourceStatusWithAnError in tests/
src/ Functional/ LingotekFieldBodyBulkTranslationTest.php - Test that we handle errors in update.
- LingotekFieldBodyBulkTranslationTest::testRequestAllTranslationsWithActionWithADocumentArchivedError in tests/
src/ Functional/ LingotekFieldBodyBulkTranslationTest.php - Tests that we manage errors when using the request all translations action.
- LingotekFieldBodyBulkTranslationTest::testRequestAllTranslationsWithActionWithADocumentLockedError in tests/
src/ Functional/ LingotekFieldBodyBulkTranslationTest.php - Tests that we manage errors when using the request all translations action.
File
- tests/
src/ Functional/ LingotekFieldBodyBulkTranslationTest.php, line 2022
Class
- LingotekFieldBodyBulkTranslationTest
- Tests translating a field using the bulk management form.
Namespace
Drupal\Tests\lingotek\FunctionalCode
protected function assertLingotekCheckSourceStatusLink($document_id = 'node.article.body', $entity_type_id = 'field_config', $prefix = NULL, $destination_entity_type_id = NULL, $destination_entity_id = NULL) {
$assert_session = $this
->assertSession();
$basepath = \Drupal::request()
->getBasePath();
$languagePrefix = $prefix === NULL ? '' : '/' . $prefix;
$destination_entity_type_id = $destination_entity_type_id ?: $entity_type_id;
$href = $basepath . $languagePrefix . '/admin/lingotek/config/check_upload/' . $entity_type_id . '/' . $document_id;
if ($destination = $this
->getDestination($destination_entity_type_id, $prefix)) {
$href .= $destination;
}
$assert_session
->linkByHrefExists($href);
}