File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed
Model/ResourceModel/Product
Test/Unit/Model/ResourceModel/Product Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -2362,7 +2362,9 @@ public function addMediaGalleryData()
23622362 return $ this ;
23632363 }
23642364
2365- if (!$ this ->getSize ()) {
2365+ $ size = $ this ->isLoaded () ? $ this ->count () : $ this ->getSize ();
2366+
2367+ if (!$ size ) {
23662368 return $ this ;
23672369 }
23682370
Original file line number Diff line number Diff line change 11<?php
22/**
3- * Copyright © Magento, Inc. All rights reserved.
4- * See COPYING.txt for license details .
3+ * Copyright 2015 Adobe
4+ * All Rights Reserved .
55 */
66declare (strict_types=1 );
77
@@ -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 );
You can’t perform that action at this time.
0 commit comments