File tree Expand file tree Collapse file tree 2 files changed +2
-1
lines changed
app/code/Magento/CatalogInventory Expand file tree Collapse file tree 2 files changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ public function getAllOptions()
42
42
public function addValueSortToCollection ($ collection , $ dir = \Magento \Framework \Data \Collection::SORT_ORDER_DESC )
43
43
{
44
44
$ collection ->getSelect ()->joinLeft (
45
- ['stock_item_table ' => 'cataloginventory_stock_item ' ],
45
+ ['stock_item_table ' => $ collection -> getTable ( 'cataloginventory_stock_item ' ) ],
46
46
"e.entity_id=stock_item_table.product_id " ,
47
47
[]
48
48
);
Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ public function testAddValueSortToCollection()
25
25
$ selectMock = $ this ->createMock (\Magento \Framework \DB \Select::class);
26
26
$ collectionMock = $ this ->createMock (\Magento \Eav \Model \Entity \Collection \AbstractCollection::class);
27
27
$ collectionMock ->expects ($ this ->atLeastOnce ())->method ('getSelect ' )->willReturn ($ selectMock );
28
+ $ collectionMock ->expects ($ this ->atLeastOnce ())->method ('getTable ' )->willReturn ('cataloginventory_stock_item ' );
28
29
29
30
$ selectMock ->expects ($ this ->once ())
30
31
->method ('joinLeft ' )
You can’t perform that action at this time.
0 commit comments