Skip to content

Commit 74a0386

Browse files
committed
#26973 Add test coverage for fixed case
1 parent 806b4f9 commit 74a0386

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

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

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ public function createDataProvider(): array
9595
return [
9696
$this->getTestDataWithoutAttributes(),
9797
$this->getTestDataWithAttributes(),
98+
$this->getTestDataWithoutDimensions()
9899
];
99100
}
100101

@@ -209,4 +210,21 @@ private function getTestDataWithAttributes(): array
209210
],
210211
];
211212
}
213+
214+
/**
215+
* @return array
216+
*/
217+
private function getTestDataWithoutDimensions(): array
218+
{
219+
$data = $this->getTestDataWithoutAttributes();
220+
221+
$data['data']['imageParamsBuilder']['image_width'] = null;
222+
$data['data']['imageParamsBuilder']['image_height'] = null;
223+
224+
$data['expected']['data']['width'] = null;
225+
$data['expected']['data']['height'] = null;
226+
$data['expected']['data']['ratio'] = 1.0;
227+
228+
return $data;
229+
}
212230
}

0 commit comments

Comments
 (0)