Part of meta-issue #2002650: [meta, no patch] improve maintainability by removing unused local variables

File /core/modules/system/lib/Drupal/system/Tests/Image/ToolkitGdTest.php

Line 250: Unused local variable $correct_colors

CommentFileSizeAuthor
#1 2080103-remove-unused-variables-1.patch738 bytesrhm5000
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

rhm5000’s picture

Status: Active » Needs review
FileSize
738 bytes
longwave’s picture

Status: Needs review » Reviewed & tested by the community
catch’s picture

Hmm this actually looks like missing test coverage that was intended but never implemented. Since it's not there let's remove the variable, but please open an issue to add the coverage back and link from here?

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed a34cb25 and pushed to 8.x. Thanks!

Committed as part of a merged commit for #2002650: [meta, no patch] improve maintainability by removing unused local variables

It does the correct color test later in the same test...

            $color = $this->getPixelColor($image, $x, $y);
            $correct_colors = $this->colorsAreEqual($color, $corner);
            $this->assertTrue($correct_colors, format_string('Image %file object after %action action has the correct color placement at corner %corner.', array('%file' => $file, '%action' => $op, '%corner' => $key)));

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