protected function LingotekSystemSiteBulkTranslationTest::assertLingotekRequestTranslationLink in Lingotek Translation 3.6.x
Same name and namespace in other branches
- 8.2 tests/src/Functional/LingotekSystemSiteBulkTranslationTest.php \Drupal\Tests\lingotek\Functional\LingotekSystemSiteBulkTranslationTest::assertLingotekRequestTranslationLink()
- 4.0.x tests/src/Functional/LingotekSystemSiteBulkTranslationTest.php \Drupal\Tests\lingotek\Functional\LingotekSystemSiteBulkTranslationTest::assertLingotekRequestTranslationLink()
- 3.0.x tests/src/Functional/LingotekSystemSiteBulkTranslationTest.php \Drupal\Tests\lingotek\Functional\LingotekSystemSiteBulkTranslationTest::assertLingotekRequestTranslationLink()
- 3.1.x tests/src/Functional/LingotekSystemSiteBulkTranslationTest.php \Drupal\Tests\lingotek\Functional\LingotekSystemSiteBulkTranslationTest::assertLingotekRequestTranslationLink()
- 3.2.x tests/src/Functional/LingotekSystemSiteBulkTranslationTest.php \Drupal\Tests\lingotek\Functional\LingotekSystemSiteBulkTranslationTest::assertLingotekRequestTranslationLink()
- 3.3.x tests/src/Functional/LingotekSystemSiteBulkTranslationTest.php \Drupal\Tests\lingotek\Functional\LingotekSystemSiteBulkTranslationTest::assertLingotekRequestTranslationLink()
- 3.4.x tests/src/Functional/LingotekSystemSiteBulkTranslationTest.php \Drupal\Tests\lingotek\Functional\LingotekSystemSiteBulkTranslationTest::assertLingotekRequestTranslationLink()
- 3.5.x tests/src/Functional/LingotekSystemSiteBulkTranslationTest.php \Drupal\Tests\lingotek\Functional\LingotekSystemSiteBulkTranslationTest::assertLingotekRequestTranslationLink()
- 3.7.x tests/src/Functional/LingotekSystemSiteBulkTranslationTest.php \Drupal\Tests\lingotek\Functional\LingotekSystemSiteBulkTranslationTest::assertLingotekRequestTranslationLink()
- 3.8.x tests/src/Functional/LingotekSystemSiteBulkTranslationTest.php \Drupal\Tests\lingotek\Functional\LingotekSystemSiteBulkTranslationTest::assertLingotekRequestTranslationLink()
Asserts there is a link for requesting 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.
Overrides LingotekManagementTestTrait::assertLingotekRequestTranslationLink
12 calls to LingotekSystemSiteBulkTranslationTest::assertLingotekRequestTranslationLink()
- LingotekSystemSiteBulkTranslationTest::testRequestAllTranslationsWithActionWithADocumentArchivedError in tests/src/ Functional/ LingotekSystemSiteBulkTranslationTest.php 
- Tests that we manage errors when using the request all translations action.
- LingotekSystemSiteBulkTranslationTest::testRequestAllTranslationsWithActionWithADocumentLockedError in tests/src/ Functional/ LingotekSystemSiteBulkTranslationTest.php 
- Tests that we manage errors when using the request all translations action.
- LingotekSystemSiteBulkTranslationTest::testRequestAllTranslationsWithActionWithAnError in tests/src/ Functional/ LingotekSystemSiteBulkTranslationTest.php 
- Tests that we manage errors when using the request all translations action.
- LingotekSystemSiteBulkTranslationTest::testRequestAllTranslationsWithActionWithAPaymentRequiredError in tests/src/ Functional/ LingotekSystemSiteBulkTranslationTest.php 
- Tests that we manage errors when using the request all translations action.
- LingotekSystemSiteBulkTranslationTest::testRequestTranslationWithActionWithADocumentArchivedError in tests/src/ Functional/ LingotekSystemSiteBulkTranslationTest.php 
- Tests that we manage errors when using the request translation action.
File
- tests/src/ Functional/ LingotekSystemSiteBulkTranslationTest.php, line 1673 
Class
- LingotekSystemSiteBulkTranslationTest
- Tests translating a config object using the bulk management form.
Namespace
Drupal\Tests\lingotek\FunctionalCode
protected function assertLingotekRequestTranslationLink($locale, $document_id = 'system.site_information_settings', $entity_type_id = 'system.site_information_settings', $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/request/' . $entity_type_id . '/' . $document_id . '/' . $locale;
  if ($destination = $this
    ->getDestination($destination_entity_type_id, $prefix)) {
    $href .= $destination;
  }
  $assert_session
    ->linkByHrefExists($href);
}