Skip to content

Commit 9e12d9e

Browse files
committed
MC-18954: Nightly build jobs were failing lately after un-skipping tests in MC-5777
1 parent 38f729b commit 9e12d9e

File tree

1 file changed

+12
-35
lines changed

1 file changed

+12
-35
lines changed

app/code/Magento/CatalogRule/Test/Unit/Model/Indexer/ReindexRuleProductTest.php

Lines changed: 12 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -89,17 +89,6 @@ public function testExecute()
8989
6 => [$websiteId => 1],
9090
];
9191

92-
$ruleMock = $this->createMock(Rule::class);
93-
$ruleMock->expects($this->once())
94-
->method('getIsActive')
95-
->willReturn(true);
96-
$ruleMock->expects($this->exactly(2))
97-
->method('getWebsiteIds')
98-
->willReturn([$websiteId]);
99-
$ruleMock->expects($this->once())
100-
->method('getMatchingProductIds')
101-
->willReturn($productIds);
102-
10392
$this->tableSwapperMock->expects($this->once())
10493
->method('getWorkingTableName')
10594
->with('catalogrule_product')
@@ -118,30 +107,18 @@ public function testExecute()
118107
->with('catalogrule_product_replica')
119108
->willReturn('catalogrule_product_replica');
120109

121-
$ruleMock->expects($this->once())
122-
->method('getId')
123-
->willReturn(100);
124-
$ruleMock->expects($this->once())
125-
->method('getCustomerGroupIds')
126-
->willReturn([10]);
127-
$ruleMock->expects($this->atLeastOnce())
128-
->method('getFromDate')
129-
->willReturn('2017-06-21');
130-
$ruleMock->expects($this->atLeastOnce())
131-
->method('getToDate')
132-
->willReturn('2017-06-30');
133-
$ruleMock->expects($this->once())
134-
->method('getSortOrder')
135-
->willReturn(1);
136-
$ruleMock->expects($this->once())
137-
->method('getSimpleAction')
138-
->willReturn('simple_action');
139-
$ruleMock->expects($this->once())
140-
->method('getDiscountAmount')
141-
->willReturn(43);
142-
$ruleMock->expects($this->once())
143-
->method('getStopRulesProcessing')
144-
->willReturn(true);
110+
$ruleMock = $this->createMock(Rule::class);
111+
$ruleMock->expects($this->once())->method('getIsActive')->willReturn(true);
112+
$ruleMock->expects($this->exactly(2))->method('getWebsiteIds')->willReturn([$websiteId]);
113+
$ruleMock->expects($this->once())->method('getMatchingProductIds')->willReturn($productIds);
114+
$ruleMock->expects($this->once())->method('getId')->willReturn(100);
115+
$ruleMock->expects($this->once())->method('getCustomerGroupIds')->willReturn([10]);
116+
$ruleMock->expects($this->atLeastOnce())->method('getFromDate')->willReturn('2017-06-21');
117+
$ruleMock->expects($this->atLeastOnce())->method('getToDate')->willReturn('2017-06-30');
118+
$ruleMock->expects($this->once())->method('getSortOrder')->willReturn(1);
119+
$ruleMock->expects($this->once())->method('getSimpleAction')->willReturn('simple_action');
120+
$ruleMock->expects($this->once())->method('getDiscountAmount')->willReturn(43);
121+
$ruleMock->expects($this->once())->method('getStopRulesProcessing')->willReturn(true);
145122

146123
$this->localeDateMock->expects($this->once())
147124
->method('getConfigTimezone')

0 commit comments

Comments
 (0)