Skip to content

Commit 2e5baa1

Browse files
author
Oleksandr Dubovyk
committed
MAGETWO-57726: [GitHub] Exception is created but not thrown #6320
- Refactor
1 parent fc20d3e commit 2e5baa1

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

app/code/Magento/Reports/Test/Unit/Block/Product/ComparedTest.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,12 @@ protected function setUp()
2727
$contextMock = $this->getMockBuilder(\Magento\Catalog\Block\Product\Context::class)
2828
->disableOriginalConstructor()
2929
->getMock();
30+
3031
$visibilityMock = $this->getMockBuilder(\Magento\Catalog\Model\Product\Visibility::class)
3132
->disableOriginalConstructor()
3233
->getMock();
33-
$this->factoryMock = $this->getMockBuilder(\Magento\Reports\Model\Product\Index\Factory::class)
34+
35+
$this->factoryMock = $this->getMockBuilder(Factory::class)
3436
->disableOriginalConstructor()
3537
->setMethods(['get'])
3638
->getMock();
@@ -56,8 +58,8 @@ public function testGetModelException()
5658
public function testGetModel()
5759
{
5860
$indexMock = $this->getMockBuilder(\Magento\Reports\Model\Product\Index\AbstractIndex::class)
59-
->disableOriginalConstructor()
60-
->getMock();
61+
->disableOriginalConstructor()
62+
->getMock();
6163

6264
$this->factoryMock->expects($this->once())->method('get')->willReturn($indexMock);
6365

dev/tests/integration/testsuite/Magento/Reports/Model/ResourceModel/Product/Lowstock/CollectionTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public function testFilterByProductTypeException()
4343
public function testFilterByProductTypeString()
4444
{
4545
$this->collection->filterByProductType('simple');
46-
$whereParts = $this->collection->getSelect()->getPart(\Zend_Db_Select::WHERE);
46+
$whereParts = $this->collection->getSelect()->getPart(\Magento\Framework\DB\Select::WHERE);
4747
$this->assertContains('simple', $whereParts[0]);
4848
}
4949

@@ -55,7 +55,7 @@ public function testFilterByProductTypeString()
5555
public function testFilterByProductTypeArray()
5656
{
5757
$this->collection->filterByProductType(['simple', 'configurable']);
58-
$whereParts = $this->collection->getSelect()->getPart(\Zend_Db_Select::WHERE);
58+
$whereParts = $this->collection->getSelect()->getPart(\Magento\Framework\DB\Select::WHERE);
5959

6060
$this->assertThat(
6161
$whereParts[0],

0 commit comments

Comments
 (0)