protected function LingotekManagementTestTrait::assertLingotekWorkbenchLink in Lingotek Translation 3.3.x
Same name and namespace in other branches
- 8.2 tests/src/Functional/LingotekManagementTestTrait.php \Drupal\Tests\lingotek\Functional\LingotekManagementTestTrait::assertLingotekWorkbenchLink()
- 4.0.x tests/src/Functional/LingotekManagementTestTrait.php \Drupal\Tests\lingotek\Functional\LingotekManagementTestTrait::assertLingotekWorkbenchLink()
- 3.0.x tests/src/Functional/LingotekManagementTestTrait.php \Drupal\Tests\lingotek\Functional\LingotekManagementTestTrait::assertLingotekWorkbenchLink()
- 3.1.x tests/src/Functional/LingotekManagementTestTrait.php \Drupal\Tests\lingotek\Functional\LingotekManagementTestTrait::assertLingotekWorkbenchLink()
- 3.2.x tests/src/Functional/LingotekManagementTestTrait.php \Drupal\Tests\lingotek\Functional\LingotekManagementTestTrait::assertLingotekWorkbenchLink()
- 3.4.x tests/src/Functional/LingotekManagementTestTrait.php \Drupal\Tests\lingotek\Functional\LingotekManagementTestTrait::assertLingotekWorkbenchLink()
- 3.5.x tests/src/Functional/LingotekManagementTestTrait.php \Drupal\Tests\lingotek\Functional\LingotekManagementTestTrait::assertLingotekWorkbenchLink()
- 3.6.x tests/src/Functional/LingotekManagementTestTrait.php \Drupal\Tests\lingotek\Functional\LingotekManagementTestTrait::assertLingotekWorkbenchLink()
- 3.7.x tests/src/Functional/LingotekManagementTestTrait.php \Drupal\Tests\lingotek\Functional\LingotekManagementTestTrait::assertLingotekWorkbenchLink()
- 3.8.x tests/src/Functional/LingotekManagementTestTrait.php \Drupal\Tests\lingotek\Functional\LingotekManagementTestTrait::assertLingotekWorkbenchLink()
Asserts there is a link to the Lingotek workbench in a new tab.
Parameters
string $locale: The locale.
string $document_id: The Lingotek document ID. Optional, defaults to 'dummy-document-hash-id'.
78 calls to LingotekManagementTestTrait::assertLingotekWorkbenchLink()
- ChineseBulkTranslationTest::testContentTypeTranslationUsingLinks in tests/
src/ Functional/ ChineseBulkTranslationTest.php - Tests that a config can be translated using the links on the management page.
- ChineseBulkTranslationTest::testNodeTranslationUsingLinks in tests/
src/ Functional/ ChineseBulkTranslationTest.php - Tests that a node can be translated using the links on the management page.
- ChineseBulkTranslationTest::testSystemSiteTranslationUsingLinks in tests/
src/ Functional/ ChineseBulkTranslationTest.php - Tests that a node can be translated using the links on the management page.
- LingotekContentTranslationPreSaveHookTest::testNodeTranslation in tests/
src/ Functional/ LingotekContentTranslationPreSaveHookTest.php - Tests that a node can be translated.
- LingotekContentTypeBulkLocaleTranslationTest::testSystemSiteTranslationUsingLinks in tests/
src/ Functional/ LingotekContentTypeBulkLocaleTranslationTest.php - Tests that a node can be translated using the links on the management page.
File
- tests/
src/ Functional/ LingotekManagementTestTrait.php, line 261
Class
- LingotekManagementTestTrait
- Trait with Lingotek management form helpers.
Namespace
Drupal\Tests\lingotek\FunctionalCode
protected function assertLingotekWorkbenchLink($locale, $document_id = 'dummy-document-hash-id') {
$basepath = \Drupal::request()
->getBasePath();
$this
->assertLinkByHref($basepath . '/admin/lingotek/workbench/' . $document_id . '/' . $locale);
$workbench_link = $this
->xpath("//a[@href='{$basepath}/admin/lingotek/workbench/{$document_id}/{$locale}' and @target='_blank']");
$this
->assertEqual(count($workbench_link), 1, 'Workbench links open in a new tab.');
}