public function ContentTranslationTest::testBasicContentTranslation in Thunder 8.5
Same name and namespace in other branches
- 8.3 tests/src/Functional/Integration/ContentTranslationTest.php \Drupal\Tests\thunder\Functional\Integration\ContentTranslationTest::testBasicContentTranslation()
- 8.4 tests/src/Functional/Integration/ContentTranslationTest.php \Drupal\Tests\thunder\Functional\Integration\ContentTranslationTest::testBasicContentTranslation()
- 6.2.x tests/src/Functional/Integration/ContentTranslationTest.php \Drupal\Tests\thunder\Functional\Integration\ContentTranslationTest::testBasicContentTranslation()
- 6.0.x tests/src/Functional/Integration/ContentTranslationTest.php \Drupal\Tests\thunder\Functional\Integration\ContentTranslationTest::testBasicContentTranslation()
- 6.1.x tests/src/Functional/Integration/ContentTranslationTest.php \Drupal\Tests\thunder\Functional\Integration\ContentTranslationTest::testBasicContentTranslation()
Test that basic translation creation works.
File
- tests/
src/ Functional/ Integration/ ContentTranslationTest.php, line 46
Class
- ContentTranslationTest
- Tests integration with the content_translation.
Namespace
Drupal\Tests\thunder\Functional\IntegrationCode
public function testBasicContentTranslation() {
$this
->logWithRole('editor');
$page = $this
->getSession()
->getPage();
$this
->drupalGet('node/add/article');
$page
->selectFieldOption('Channel', 'News');
$page
->fillField('Title', 'English draft');
$page
->fillField('SEO Title', 'English draft');
$page
->pressButton('Save');
$node = $this
->getNodeByTitle('English draft');
$url = $node
->toUrl('drupal:content-translation-add');
$url
->setRouteParameter('source', 'en');
$url
->setRouteParameter('target', 'de');
$this
->drupalGet($url);
$page
->fillField('Title', 'German draft');
$page
->pressButton('Save');
}