public function LingotekNodeTranslationTest::testAddingContentInDifferentLocale in Lingotek Translation 4.0.x
Same name and namespace in other branches
- 8.2 tests/src/Functional/LingotekNodeTranslationTest.php \Drupal\Tests\lingotek\Functional\LingotekNodeTranslationTest::testAddingContentInDifferentLocale()
- 3.0.x tests/src/Functional/LingotekNodeTranslationTest.php \Drupal\Tests\lingotek\Functional\LingotekNodeTranslationTest::testAddingContentInDifferentLocale()
- 3.1.x tests/src/Functional/LingotekNodeTranslationTest.php \Drupal\Tests\lingotek\Functional\LingotekNodeTranslationTest::testAddingContentInDifferentLocale()
- 3.2.x tests/src/Functional/LingotekNodeTranslationTest.php \Drupal\Tests\lingotek\Functional\LingotekNodeTranslationTest::testAddingContentInDifferentLocale()
- 3.3.x tests/src/Functional/LingotekNodeTranslationTest.php \Drupal\Tests\lingotek\Functional\LingotekNodeTranslationTest::testAddingContentInDifferentLocale()
- 3.4.x tests/src/Functional/LingotekNodeTranslationTest.php \Drupal\Tests\lingotek\Functional\LingotekNodeTranslationTest::testAddingContentInDifferentLocale()
- 3.5.x tests/src/Functional/LingotekNodeTranslationTest.php \Drupal\Tests\lingotek\Functional\LingotekNodeTranslationTest::testAddingContentInDifferentLocale()
- 3.6.x tests/src/Functional/LingotekNodeTranslationTest.php \Drupal\Tests\lingotek\Functional\LingotekNodeTranslationTest::testAddingContentInDifferentLocale()
- 3.7.x tests/src/Functional/LingotekNodeTranslationTest.php \Drupal\Tests\lingotek\Functional\LingotekNodeTranslationTest::testAddingContentInDifferentLocale()
- 3.8.x tests/src/Functional/LingotekNodeTranslationTest.php \Drupal\Tests\lingotek\Functional\LingotekNodeTranslationTest::testAddingContentInDifferentLocale()
Test that when a node is uploaded in a different locale that locale is used.
File
- tests/
src/ Functional/ LingotekNodeTranslationTest.php, line 400
Class
- LingotekNodeTranslationTest
- Tests translating a node.
Namespace
Drupal\Tests\lingotek\FunctionalCode
public function testAddingContentInDifferentLocale() {
// Login as admin.
$this
->drupalLogin($this->rootUser);
// Create a node.
$edit = [];
$edit['title[0][value]'] = 'Llamas are cool es-MX';
$edit['body[0][value]'] = 'Llamas are very cool es-MX';
$edit['langcode[0][value]'] = 'es';
$this
->saveAndPublishNodeForm($edit);
$this
->assertText('Llamas are cool es-MX sent to Lingotek successfully.');
$this
->assertIdentical('es_MX', \Drupal::state()
->get('lingotek.uploaded_locale'));
}