Skip to content

Commit a08fd0d

Browse files
🔃 [EngCom] Public Pull Requests - 2.1-develop
Accepted Public Pull Requests: - #13916: Pass Expected Data Type in backgroundColor Call (2.1) (by @northernco)
2 parents 526e7b0 + 988a5ca commit a08fd0d

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
@@ -202,7 +202,7 @@ protected function setupImageProperties(\Magento\Framework\Image $image, $isSwat
202202
if ($isSwatch) {
203203
$image->keepFrame(true);
204204
$image->keepTransparency(true);
205-
$image->backgroundColor('#FFF');
205+
$image->backgroundColor([255, 255, 255]);
206206
}
207207
return $this;
208208
}

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,7 @@ public function testGenerateSwatchVariations()
193193
$this->imageFactoryMock->expects($this->any())->method('create')->willReturn($image);
194194
$this->generateImageConfig();
195195
$image->expects($this->any())->method('resize')->will($this->returnSelf());
196+
$image->expects($this->atLeastOnce())->method('backgroundColor')->with([255, 255, 255])->willReturnSelf();
196197
$this->mediaHelperObject->generateSwatchVariations('/e/a/earth.png');
197198
}
198199

0 commit comments

Comments
 (0)