Skip to content

Commit 81c5f5f

Browse files
committed
MAGETWO-54645: Smarter Cache Invalidation on Qty Change
1 parent 2021f2e commit 81c5f5f

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

app/code/Magento/CatalogInventory/Test/Unit/Model/Indexer/Stock/CacheCleanerTest.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,9 @@ public function testClean($stockStatusBefore, $stockStatusAfter, $qtyAfter, $sto
106106
$this->eventManagerMock->expects($this->once())->method('dispatch')
107107
->with('clean_cache_by_tags', ['object' => $this->cacheContextMock]);
108108

109-
$this->unit->clean([], function() {});
109+
$callback = function () {
110+
};
111+
$this->unit->clean([], $callback);
110112
}
111113

112114
/**
@@ -148,7 +150,9 @@ public function testNotCleanCache($stockStatusBefore, $stockStatusAfter, $qtyAft
148150
$this->cacheContextMock->expects($this->never())->method('registerEntities');
149151
$this->eventManagerMock->expects($this->never())->method('dispatch');
150152

151-
$this->unit->clean([], function() {});
153+
$callback = function () {
154+
};
155+
$this->unit->clean([], $callback);
152156
}
153157

154158
/**

0 commit comments

Comments
 (0)