Skip to content

Commit e32bd98

Browse files
author
Stanislav Idolov
authored
ENGCOM-669: Pass Expected Data Type in backgroundColor Call (2.3) #13917
2 parents 099e8c3 + 2bc32fa commit e32bd98

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

app/code/Magento/Swatches/Helper/Media.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ protected function setupImageProperties(\Magento\Framework\Image $image, $isSwat
211211
if ($isSwatch) {
212212
$image->keepFrame(true);
213213
$image->keepTransparency(true);
214-
$image->backgroundColor('#FFF');
214+
$image->backgroundColor([255, 255, 255]);
215215
}
216216
return $this;
217217
}

app/code/Magento/Swatches/Test/Unit/Helper/MediaTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,7 @@ public function testGenerateSwatchVariations()
158158
$this->imageFactoryMock->expects($this->any())->method('create')->willReturn($image);
159159
$this->generateImageConfig();
160160
$image->expects($this->any())->method('resize')->will($this->returnSelf());
161+
$image->expects($this->atLeastOnce())->method('backgroundColor')->with([255, 255, 255])->willReturnSelf();
161162
$this->mediaHelperObject->generateSwatchVariations('/e/a/earth.png');
162163
}
163164

0 commit comments

Comments
 (0)