Skip to content

Commit 9f0b1af

Browse files
committed
Product image builder - Override attributes when builder used multiple times
1 parent 44e8747 commit 9f0b1af

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

app/code/Magento/Catalog/Test/Unit/Block/Product/ImageBuilderTest.php

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,10 +164,20 @@ public function testCreateMultipleCalls($data)
164164
->willReturnOnConsecutiveCalls($firstCall['data']['url'], $secondCall['data']['url']);
165165
$helperMock->expects($this->exactly(4))
166166
->method('getWidth')
167-
->willReturnOnConsecutiveCalls($firstCall['data']['width'], $firstCall['data']['width'], $secondCall['data']['width'], $secondCall['data']['width']);
167+
->willReturnOnConsecutiveCalls(
168+
$firstCall['data']['width'],
169+
$firstCall['data']['width'],
170+
$secondCall['data']['width'],
171+
$secondCall['data']['width']
172+
);
168173
$helperMock->expects($this->exactly(4))
169174
->method('getHeight')
170-
->willReturnOnConsecutiveCalls($firstCall['data']['height'], $firstCall['data']['height'], $secondCall['data']['height'], $secondCall['data']['height']);
175+
->willReturnOnConsecutiveCalls(
176+
$firstCall['data']['height'],
177+
$firstCall['data']['height'],
178+
$secondCall['data']['height'],
179+
$secondCall['data']['height']
180+
);
171181
$helperMock->expects($this->exactly(2))
172182
->method('getLabel')
173183
->willReturnOnConsecutiveCalls($firstCall['data']['label'], $secondCall['data']['label']);

0 commit comments

Comments
 (0)