Problem/Motivation

In #2901572: Fix 'Drupal.Commenting.PostStatementComment' coding standard and related issues we noticed this:
$this->assertEqual($expected, $metadata); //, 'The correct metadata (including custom metadata) is generated.');

Proposed resolution

Follow the steps in #2909362: [meta] Commented-out code in Drupal to determine why this comment is there and whether it is safe to remove it.

Remaining tasks

  • Use git log -L.
  • Determine why this comment is there and whether it is safe to remove it.
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

mfernea created an issue. See original summary.

mfernea’s picture

This was introduced by the patch at https://www.drupal.org/node/1874640#comment-8685511. There's no mention in the issue about this type of change. It's the only place in the patch where an assertEqual call was modified. The message looks ok to me. Similar messages are used in the same class:

$this->assertEqual($expected_2, $metadata_2, 'The correct metadata is generated for the second field.');

So, I would keep it.

mfernea’s picture

Here is the patch.

mfernea’s picture

Status: Active » Needs review

Status change for bots.

jofitz’s picture

Status: Needs review » Reviewed & tested by the community

This seems like a sensible conclusion considering the similar usage in the same file.

larowlan’s picture

Status: Reviewed & tested by the community » Needs work
Issue tags: +Needs reroll
error: patch failed: core/modules/quickedit/tests/src/Kernel/MetadataGeneratorTest.php:172
error: core/modules/quickedit/tests/src/Kernel/MetadataGeneratorTest.php: patch does not apply

No longer applies

mfernea’s picture

Status: Needs work » Needs review
Issue tags: -Needs reroll
FileSize
689 bytes

Re-roll.

jofitz’s picture

Status: Needs review » Reviewed & tested by the community

Simple re-roll, patch functionally still the same. Back to RTBC.

Gábor Hojtsy’s picture

Title: MetadataGeneratorTest.php - Weird comments » Undo accidental commenting of message in MetadataGeneratorTest.php

  • Gábor Hojtsy committed deac259 on 8.5.x
    Issue #2911164 by mfernea, Jo Fitzgerald: Undo accidental commenting of...

  • Gábor Hojtsy committed b667d4c on 8.4.x
    Issue #2911164 by mfernea, Jo Fitzgerald: Undo accidental commenting of...
Gábor Hojtsy’s picture

Title: Undo accidental commenting of message in MetadataGeneratorTest.php » Undo accidental commenting of message in MetadataGeneratorTest
Version: 8.5.x-dev » 8.4.x-dev
Status: Reviewed & tested by the community » Fixed

Thanks, committed to 8.5.x and cherry-picked to 8.4.x.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.