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()
2362
2362
return $ this ;
2363
2363
}
2364
2364
2365
- if (!$ this ->getSize ()) {
2365
+ $ size = $ this ->isLoaded () ? $ this ->count () : $ this ->getSize ();
2366
+
2367
+ if (!$ size ) {
2366
2368
return $ this ;
2367
2369
}
2368
2370
Original file line number Diff line number Diff line change 1
1
<?php
2
2
/**
3
- * Copyright © Magento, Inc. All rights reserved.
4
- * See COPYING.txt for license details .
3
+ * Copyright 2015 Adobe
4
+ * All Rights Reserved .
5
5
*/
6
6
declare (strict_types=1 );
7
7
@@ -311,7 +311,6 @@ public function testAddMediaGalleryData()
311
311
$ this ->metadataPoolMock ->expects ($ this ->once ())->method ('getMetadata ' )->willReturn ($ metadataMock );
312
312
$ metadataMock ->expects ($ this ->once ())->method ('getLinkField ' )->willReturn ($ linkField );
313
313
314
- $ this ->connectionMock ->expects ($ this ->once ())->method ('fetchOne ' )->with ($ selectMock )->willReturn (42 );
315
314
$ this ->connectionMock ->expects ($ this ->once ())->method ('fetchAll ' )->with ($ selectMock )->willReturn (
316
315
[['row_id ' => $ rowId ]]
317
316
);
You can’t perform that action at this time.
0 commit comments