public function LingotekNodeBulkLocaleTranslationTest::testSourceUpdatedAfterRequestingTranslation in Lingotek Translation 3.5.x
Same name and namespace in other branches
- 8.2 tests/src/Functional/LingotekNodeBulkLocaleTranslationTest.php \Drupal\Tests\lingotek\Functional\LingotekNodeBulkLocaleTranslationTest::testSourceUpdatedAfterRequestingTranslation()
- 4.0.x tests/src/Functional/LingotekNodeBulkLocaleTranslationTest.php \Drupal\Tests\lingotek\Functional\LingotekNodeBulkLocaleTranslationTest::testSourceUpdatedAfterRequestingTranslation()
- 3.0.x tests/src/Functional/LingotekNodeBulkLocaleTranslationTest.php \Drupal\Tests\lingotek\Functional\LingotekNodeBulkLocaleTranslationTest::testSourceUpdatedAfterRequestingTranslation()
- 3.1.x tests/src/Functional/LingotekNodeBulkLocaleTranslationTest.php \Drupal\Tests\lingotek\Functional\LingotekNodeBulkLocaleTranslationTest::testSourceUpdatedAfterRequestingTranslation()
- 3.2.x tests/src/Functional/LingotekNodeBulkLocaleTranslationTest.php \Drupal\Tests\lingotek\Functional\LingotekNodeBulkLocaleTranslationTest::testSourceUpdatedAfterRequestingTranslation()
- 3.3.x tests/src/Functional/LingotekNodeBulkLocaleTranslationTest.php \Drupal\Tests\lingotek\Functional\LingotekNodeBulkLocaleTranslationTest::testSourceUpdatedAfterRequestingTranslation()
- 3.4.x tests/src/Functional/LingotekNodeBulkLocaleTranslationTest.php \Drupal\Tests\lingotek\Functional\LingotekNodeBulkLocaleTranslationTest::testSourceUpdatedAfterRequestingTranslation()
- 3.6.x tests/src/Functional/LingotekNodeBulkLocaleTranslationTest.php \Drupal\Tests\lingotek\Functional\LingotekNodeBulkLocaleTranslationTest::testSourceUpdatedAfterRequestingTranslation()
- 3.7.x tests/src/Functional/LingotekNodeBulkLocaleTranslationTest.php \Drupal\Tests\lingotek\Functional\LingotekNodeBulkLocaleTranslationTest::testSourceUpdatedAfterRequestingTranslation()
- 3.8.x tests/src/Functional/LingotekNodeBulkLocaleTranslationTest.php \Drupal\Tests\lingotek\Functional\LingotekNodeBulkLocaleTranslationTest::testSourceUpdatedAfterRequestingTranslation()
Tests that source is updated after requesting translation.
File
- tests/
src/ Functional/ LingotekNodeBulkLocaleTranslationTest.php, line 130
Class
- LingotekNodeBulkLocaleTranslationTest
- Tests translating a node into locales using the bulk management form.
Namespace
Drupal\Tests\lingotek\FunctionalCode
public function testSourceUpdatedAfterRequestingTranslation() {
// Login as admin.
$this
->drupalLogin($this->rootUser);
// Create a node.
$edit = [];
$edit['title[0][value]'] = 'Llamas are cool';
$edit['body[0][value]'] = 'Llamas are very cool';
$edit['langcode[0][value]'] = 'en';
$edit['lingotek_translation_management[lingotek_translation_profile]'] = 'automatic';
$this
->saveAndPublishNodeForm($edit);
$this
->goToContentBulkManagementForm();
// There is a link for checking status.
$this
->assertLingotekCheckSourceStatusLink();
// And we can already request a translation.
$this
->assertLingotekRequestTranslationLink('de_AT', 'dummy-document-hash-id');
// Request the German (AT) translation.
$this
->assertLingotekRequestTranslationLink('de_AT', 'dummy-document-hash-id');
$this
->clickLink('DE-AT');
$this
->assertText("Locale 'de_AT' was added as a translation target for node Llamas are cool.");
// Check that the source status has been updated.
$this
->assertNoLingotekCheckSourceStatusLink();
}