Skip to content

Commit 1583f8d

Browse files
author
Stanislav Idolov
committed
Merge remote-tracking branch 'origin/ENGCOM-2777-magento-magento2-17572' into 2.3-develop-prs
2 parents a489b28 + 5332072 commit 1583f8d

File tree

1 file changed

+18
-8
lines changed

1 file changed

+18
-8
lines changed

app/code/Magento/Catalog/Test/Unit/Cron/DeleteOutdatedPriceValuesTest.php

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -90,17 +90,20 @@ public function testExecute()
9090
$attributeId = 15;
9191
$conditions = ['first', 'second'];
9292

93-
$this->scopeConfigMock->expects($this->once())->method('getValue')->with(Store::XML_PATH_PRICE_SCOPE)
93+
$this->scopeConfigMock
94+
->expects($this->once())
95+
->method('getValue')
96+
->with(Store::XML_PATH_PRICE_SCOPE)
9497
->willReturn(Store::XML_PATH_PRICE_SCOPE);
95-
$this->attributeRepositoryMock->expects($this->once())->method('get')
98+
$this->attributeRepositoryMock
99+
->expects($this->once())
100+
->method('get')
96101
->with(ProductAttributeInterface::ENTITY_TYPE_CODE, ProductAttributeInterface::CODE_PRICE)
97102
->willReturn($this->attributeMock);
98103
$this->attributeMock->expects($this->once())->method('getId')->willReturn($attributeId);
99104
$this->attributeMock->expects($this->once())->method('getBackend')->willReturn($this->attributeBackendMock);
100105
$this->attributeBackendMock->expects($this->once())->method('getTable')->willReturn($table);
101-
$this->resourceConnectionMock->expects($this->once())
102-
->method('getConnection')
103-
->willReturn($this->dbAdapterMock);
106+
$this->resourceConnectionMock->expects($this->once())->method('getConnection')->willReturn($this->dbAdapterMock);
104107
$this->dbAdapterMock->expects($this->exactly(2))->method('quoteInto')->willReturnMap([
105108
['attribute_id = ?', $attributeId, null, null, $conditions[0]],
106109
['store_id != ?', Store::DEFAULT_STORE_ID, null, null, $conditions[1]],
@@ -117,10 +120,17 @@ public function testExecute()
117120
*/
118121
public function testExecutePriceConfigIsNotSetToGlobal()
119122
{
120-
$this->scopeConfigMock->expects($this->once())->method('getValue')->with(Store::XML_PATH_PRICE_SCOPE)
123+
$this->scopeConfigMock
124+
->expects($this->once())
125+
->method('getValue')
126+
->with(Store::XML_PATH_PRICE_SCOPE)
121127
->willReturn(null);
122-
$this->attributeRepositoryMock->expects($this->never())->method('get');
123-
$this->dbAdapterMock->expects($this->never())->method('delete');
128+
$this->attributeRepositoryMock
129+
->expects($this->never())
130+
->method('get');
131+
$this->dbAdapterMock
132+
->expects($this->never())
133+
->method('delete');
124134

125135
$this->deleteOutdatedPriceValues->execute();
126136
}

0 commit comments

Comments
 (0)