function ContentTranslationContextualLinksTest::testContentTranslationContextualLinks
Same name in this branch
- 11.x core/modules/content_translation/tests/src/FunctionalJavascript/ContentTranslationContextualLinksTest.php \Drupal\Tests\content_translation\FunctionalJavascript\ContentTranslationContextualLinksTest::testContentTranslationContextualLinks()
Same name in other branches
- 9 core/modules/content_translation/tests/src/FunctionalJavascript/ContentTranslationContextualLinksTest.php \Drupal\Tests\content_translation\FunctionalJavascript\ContentTranslationContextualLinksTest::testContentTranslationContextualLinks()
- 9 core/modules/content_translation/tests/src/Functional/ContentTranslationContextualLinksTest.php \Drupal\Tests\content_translation\Functional\ContentTranslationContextualLinksTest::testContentTranslationContextualLinks()
- 8.9.x core/modules/content_translation/tests/src/FunctionalJavascript/ContentTranslationContextualLinksTest.php \Drupal\Tests\content_translation\FunctionalJavascript\ContentTranslationContextualLinksTest::testContentTranslationContextualLinks()
- 8.9.x core/modules/content_translation/tests/src/Functional/ContentTranslationContextualLinksTest.php \Drupal\Tests\content_translation\Functional\ContentTranslationContextualLinksTest::testContentTranslationContextualLinks()
- 10 core/modules/content_translation/tests/src/FunctionalJavascript/ContentTranslationContextualLinksTest.php \Drupal\Tests\content_translation\FunctionalJavascript\ContentTranslationContextualLinksTest::testContentTranslationContextualLinks()
- 10 core/modules/content_translation/tests/src/Functional/ContentTranslationContextualLinksTest.php \Drupal\Tests\content_translation\Functional\ContentTranslationContextualLinksTest::testContentTranslationContextualLinks()
Tests that a contextual link is available for translating a node.
File
-
core/
modules/ content_translation/ tests/ src/ Functional/ ContentTranslationContextualLinksTest.php, line 113
Class
- ContentTranslationContextualLinksTest
- Tests that contextual links are available for content translation.
Namespace
Drupal\Tests\content_translation\FunctionalCode
public function testContentTranslationContextualLinks() : void {
// Create a node.
$title = $this->randomString();
$this->drupalCreateNode([
'type' => $this->bundle,
'title' => $title,
'langcode' => 'en',
]);
$node = $this->drupalGetNodeByTitle($title);
static::enableContentTranslation('node', $this->bundle);
// Check that the link leads to the translate page.
$this->drupalLogin($this->translator);
$translate_link = 'node/' . $node->id() . '/translations';
$this->drupalGet($translate_link);
$this->assertSession()
->pageTextContains('Translations of ' . $node->label());
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.