You are here

protected function CommentTranslationUITest::getNewEntityValues in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/comment/tests/src/Functional/CommentTranslationUITest.php \Drupal\Tests\comment\Functional\CommentTranslationUITest::getNewEntityValues()
  2. 9 core/modules/comment/tests/src/Functional/CommentTranslationUITest.php \Drupal\Tests\comment\Functional\CommentTranslationUITest::getNewEntityValues()

File

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

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);
}