Remove unused variable $translation from BulkFormTest

Created on 9 January 2023, over 1 year ago
Updated 23 January 2023, over 1 year ago

Problem/Motivation

Remove unused variable $translation from BulkFormTest. There are couple of instances

core/modules/node/tests/src/Functional/Views/BulkFormTest.php

// Create translations for all languages for some nodes.
    for ($i = 0; $i < 2; $i++) {
      $node = $this->nodes[$i];
      foreach ($langcodes as $langcode) {
        if (!$node->hasTranslation($langcode)) {
          $title = $this->randomMachineName() . ' [' . $node->id() . ':' . $langcode . ']';
          $translation = $node->addTranslation($langcode, ['title' => $title, 'promote' => FALSE]);
        }
      }
      $node->save();
    }
    // Create a node with only one translation.
    $node = $this->nodes[2];
    $langcode = 'en';
    $title = $this->randomMachineName() . ' [' . $node->id() . ':' . $langcode . ']';
    $translation = $node->addTranslation($langcode, ['title' => $title]);
    $node->save();

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

📌 Task
Status

Fixed

Version

9.5

Component
Node system 

Last updated less than a minute ago

No maintainer
Created by

🇮🇳India anmolgoyal74

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024