public function LingotekFieldBodyBulkTranslationTest::testAddingLanguageAllowsRequesting in Lingotek Translation 8
Tests that a config can be translated using the links on the management page.
File
- src/
Tests/ LingotekFieldBodyBulkTranslationTest.php, line 349
Class
- LingotekFieldBodyBulkTranslationTest
- Tests translating a field using the bulk management form.
Namespace
Drupal\lingotek\TestsCode
public function testAddingLanguageAllowsRequesting() {
// We need a node with translations first.
$this
->testFieldBodyTranslationUsingLinks();
// Add a language.
ConfigurableLanguage::createFromLangcode('ca')
->save();
// Go to the bulk config management page.
$this
->goToConfigBulkManagementForm('node_fields');
$basepath = \Drupal::request()
->getBasePath();
// There is a link for requesting the Catalan translation.
$this
->assertLinkByHref($basepath . '/admin/lingotek/config/request/field_config/node.article.body/ca_ES?destination=' . $basepath . '/admin/lingotek/config/manage');
$this
->clickLink('CA');
$this
->assertText("Translation to ca_ES requested successfully");
}