Skip to content

Commit 550ad93

Browse files
committed
MAGETWO-36857: Abandoned Carts report grid is not displayed
- fix unit-test
1 parent e939450 commit 550ad93

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

app/code/Magento/Reports/Test/Unit/Model/Resource/Report/Quote/CollectionTest.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,17 +33,17 @@ public function testGetSelectCountSql()
3333
->getConstructArguments('Magento\Reports\Model\Resource\Quote\Collection');
3434
$collection = $this->getMock(
3535
'Magento\Reports\Model\Resource\Quote\Collection',
36-
['prepareActiveCartItems', 'getSelect'],
36+
['getSelect'],
3737
$constructArgs,
3838
'',
3939
false
4040
);
4141

42-
$collection->expects($this->once())->method('prepareActiveCartItems')->willReturn($this->selectMock);
42+
$collection->expects($this->once())->method('getSelect')->willReturn($this->selectMock);
4343
$this->selectMock->expects($this->atLeastOnce())->method('reset')->willReturnSelf();
4444
$this->selectMock->expects($this->once())
4545
->method('columns')
46-
->with('COUNT(DISTINCT quote_items.product_id)')
46+
->with('COUNT(*)')
4747
->willReturnSelf();
4848
$this->assertEquals($this->selectMock, $collection->getSelectCountSql());
4949
}
@@ -52,9 +52,9 @@ public function testPrepareActiveCartItems()
5252
{
5353
/** @var $collection \PHPUnit_Framework_MockObject_MockObject */
5454
$constructArgs = $this->objectManager
55-
->getConstructArguments('Magento\Reports\Model\Resource\Quote\Collection');
55+
->getConstructArguments('Magento\Reports\Model\Resource\Quote\Item\Collection');
5656
$collection = $this->getMock(
57-
'Magento\Reports\Model\Resource\Quote\Collection',
57+
'Magento\Reports\Model\Resource\Quote\Item\Collection',
5858
['getSelect', 'getTable'],
5959
$constructArgs,
6060
'',
@@ -76,7 +76,7 @@ public function testLoadWithFilter()
7676
{
7777
/** @var $collection \PHPUnit_Framework_MockObject_MockObject */
7878
$constructArgs = $this->objectManager
79-
->getConstructArguments('Magento\Reports\Model\Resource\Quote\Collection');
79+
->getConstructArguments('Magento\Reports\Model\Resource\Quote\Item\Collection');
8080
$constructArgs['eventManager'] = $this->getMock('Magento\Framework\Event\ManagerInterface', [], [], '', false);
8181
$readConnectionMock = $this->getMock('Magento\Framework\DB\Adapter\AdapterInterface', [], [], '', false);
8282
$resourceMock = $this->getMock('\Magento\Quote\Model\Resource\Quote', [], [], '', false);
@@ -87,7 +87,7 @@ public function testLoadWithFilter()
8787
$constructArgs['orderResource'] = $orderResourceMock;
8888

8989
$collection = $this->getMock(
90-
'Magento\Reports\Model\Resource\Quote\Collection',
90+
'Magento\Reports\Model\Resource\Quote\Item\Collection',
9191
[
9292
'_beforeLoad',
9393
'_renderFilters',

0 commit comments

Comments
 (0)