public function LingotekNodeBulkTranslationTest::testAddingLanguageAllowsRequesting in Lingotek Translation 8
Tests that a node can be translated using the links on the management page.
1 call to LingotekNodeBulkTranslationTest::testAddingLanguageAllowsRequesting()
- LingotekNodeBulkTranslationTest::testFormWorksAfterRemovingLanguageWithStatuses in src/
Tests/ LingotekNodeBulkTranslationTest.php - Tests that a config can be translated using the links on the management page.
File
- src/
Tests/ LingotekNodeBulkTranslationTest.php, line 569
Class
- LingotekNodeBulkTranslationTest
- Tests translating a node using the bulk management form.
Namespace
Drupal\lingotek\TestsCode
public function testAddingLanguageAllowsRequesting() {
// We need a node with translations first.
$this
->testNodeTranslationUsingLinks();
// Add a language.
ConfigurableLanguage::createFromLangcode('ca')
->save();
$this
->goToContentBulkManagementForm();
$basepath = \Drupal::request()
->getBasePath();
// There is a link for requesting the Catalan translation.
$this
->assertLinkByHref($basepath . '/admin/lingotek/entity/add_target/dummy-document-hash-id/ca_ES?destination=' . $basepath . '/admin/lingotek/manage/node');
$this
->clickLink('CA');
$this
->assertText("Locale 'ca_ES' was added as a translation target for node Llamas are cool.");
}