public function LingotekFieldBodyBulkTranslationTest::testAddingLanguageAllowsRequesting in Lingotek Translation 3.6.x
Same name and namespace in other branches
- 8.2 tests/src/Functional/LingotekFieldBodyBulkTranslationTest.php \Drupal\Tests\lingotek\Functional\LingotekFieldBodyBulkTranslationTest::testAddingLanguageAllowsRequesting()
- 4.0.x tests/src/Functional/LingotekFieldBodyBulkTranslationTest.php \Drupal\Tests\lingotek\Functional\LingotekFieldBodyBulkTranslationTest::testAddingLanguageAllowsRequesting()
- 3.0.x tests/src/Functional/LingotekFieldBodyBulkTranslationTest.php \Drupal\Tests\lingotek\Functional\LingotekFieldBodyBulkTranslationTest::testAddingLanguageAllowsRequesting()
- 3.1.x tests/src/Functional/LingotekFieldBodyBulkTranslationTest.php \Drupal\Tests\lingotek\Functional\LingotekFieldBodyBulkTranslationTest::testAddingLanguageAllowsRequesting()
- 3.2.x tests/src/Functional/LingotekFieldBodyBulkTranslationTest.php \Drupal\Tests\lingotek\Functional\LingotekFieldBodyBulkTranslationTest::testAddingLanguageAllowsRequesting()
- 3.3.x tests/src/Functional/LingotekFieldBodyBulkTranslationTest.php \Drupal\Tests\lingotek\Functional\LingotekFieldBodyBulkTranslationTest::testAddingLanguageAllowsRequesting()
- 3.4.x tests/src/Functional/LingotekFieldBodyBulkTranslationTest.php \Drupal\Tests\lingotek\Functional\LingotekFieldBodyBulkTranslationTest::testAddingLanguageAllowsRequesting()
- 3.5.x tests/src/Functional/LingotekFieldBodyBulkTranslationTest.php \Drupal\Tests\lingotek\Functional\LingotekFieldBodyBulkTranslationTest::testAddingLanguageAllowsRequesting()
- 3.7.x tests/src/Functional/LingotekFieldBodyBulkTranslationTest.php \Drupal\Tests\lingotek\Functional\LingotekFieldBodyBulkTranslationTest::testAddingLanguageAllowsRequesting()
- 3.8.x tests/src/Functional/LingotekFieldBodyBulkTranslationTest.php \Drupal\Tests\lingotek\Functional\LingotekFieldBodyBulkTranslationTest::testAddingLanguageAllowsRequesting()
Tests that a config can be translated using the links on the management page.
File
- tests/
src/ Functional/ LingotekFieldBodyBulkTranslationTest.php, line 337
Class
- LingotekFieldBodyBulkTranslationTest
- Tests translating a field using the bulk management form.
Namespace
Drupal\Tests\lingotek\FunctionalCode
public function testAddingLanguageAllowsRequesting() {
$assert_session = $this
->assertSession();
// 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.
$assert_session
->linkByHrefExists($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");
}