function CommentTranslationUITest::getNewEntityValues

Same name in other branches
  1. 9 core/modules/comment/tests/src/Functional/CommentTranslationUITest.php \Drupal\Tests\comment\Functional\CommentTranslationUITest::getNewEntityValues()
  2. 8.9.x core/modules/comment/tests/src/Functional/CommentTranslationUITest.php \Drupal\Tests\comment\Functional\CommentTranslationUITest::getNewEntityValues()
  3. 10 core/modules/comment/tests/src/Functional/CommentTranslationUITest.php \Drupal\Tests\comment\Functional\CommentTranslationUITest::getNewEntityValues()

Overrides ContentTranslationUITestBase::getNewEntityValues

File

core/modules/comment/tests/src/Functional/CommentTranslationUITest.php, line 131

Class

CommentTranslationUITest
Tests the Comment Translation UI.

Namespace

Drupal\Tests\comment\Functional

Code

protected function getNewEntityValues($langcode) {
    // Comment subject is not translatable hence we use a fixed value.
    return [
        'subject' => [
            [
                'value' => $this->subject,
            ],
        ],
        'comment_body' => [
            [
                'value' => $this->randomMachineName(16),
            ],
        ],
    ] + parent::getNewEntityValues($langcode);
}

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