Skip to content

Commit b8c6634

Browse files
author
Ihor Kh
committed
#39111: Product Collection - addMediaGalleryData calls getSize when the collection maybe or will be loaded (Can use count to avoid an extra DB query)
- Fixed call count instead of getSize if collection is loaded.
1 parent 072a3fe commit b8c6634

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

app/code/Magento/Catalog/Test/Unit/Model/ResourceModel/Product/CollectionTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,6 @@ public function testAddMediaGalleryData()
311311
$this->metadataPoolMock->expects($this->once())->method('getMetadata')->willReturn($metadataMock);
312312
$metadataMock->expects($this->once())->method('getLinkField')->willReturn($linkField);
313313

314-
$this->connectionMock->expects($this->once())->method('fetchOne')->with($selectMock)->willReturn(42);
315314
$this->connectionMock->expects($this->once())->method('fetchAll')->with($selectMock)->willReturn(
316315
[['row_id' => $rowId]]
317316
);

0 commit comments

Comments
 (0)