function TranslationLinkTest::testTranslationLink

Same name in other branches
  1. 9 core/modules/content_translation/tests/src/Functional/Views/TranslationLinkTest.php \Drupal\Tests\content_translation\Functional\Views\TranslationLinkTest::testTranslationLink()
  2. 8.9.x core/modules/content_translation/tests/src/Functional/Views/TranslationLinkTest.php \Drupal\Tests\content_translation\Functional\Views\TranslationLinkTest::testTranslationLink()
  3. 10 core/modules/content_translation/tests/src/Functional/Views/TranslationLinkTest.php \Drupal\Tests\content_translation\Functional\Views\TranslationLinkTest::testTranslationLink()

Tests the content translation overview link field handler.

File

core/modules/content_translation/tests/src/Functional/Views/TranslationLinkTest.php, line 72

Class

TranslationLinkTest
Tests the content translation overview link field handler.

Namespace

Drupal\Tests\content_translation\Functional\Views

Code

public function testTranslationLink() : void {
    $this->drupalGet('test-entity-translations-link');
    $this->assertSession()
        ->linkByHrefExists('user/1/translations');
    $this->assertSession()
        ->linkByHrefNotExists('user/2/translations', 'The translations link is not present when content_translation_translate_access() is FALSE.');
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.