Skip to content

Commit d9557e6

Browse files
committed
ACP2E-1243: the catalog_index_refresh_price cron fails with an error that is only reported when run between 0000 and 0059 UTC
1 parent 0e261c8 commit d9557e6

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

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

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ protected function setUp(): void
8282
$this->_localeDateMock = $this->getMockForAbstractClass(TimezoneInterface::class);
8383
$this->_eavConfigMock = $this->createMock(Config::class);
8484
$this->_priceProcessorMock = $this->createMock(Processor::class);
85-
85+
$this->metadataPool = $this->createMock(MetadataPool::class);
8686
$this->metadataMock = $this->createMock(EntityMetadata::class);
8787

8888
$this->_model = new RefreshSpecialPrices(
@@ -91,15 +91,9 @@ protected function setUp(): void
9191
$this->_dateTimeMock,
9292
$this->_localeDateMock,
9393
$this->_eavConfigMock,
94-
$this->_priceProcessorMock
94+
$this->_priceProcessorMock,
95+
$this->metadataPool
9596
);
96-
97-
$this->metadataPool = $this->createMock(MetadataPool::class);
98-
99-
$reflection = new \ReflectionClass(get_class($this->_model));
100-
$reflectionProperty = $reflection->getProperty('metadataPool');
101-
$reflectionProperty->setAccessible(true);
102-
$reflectionProperty->setValue($this->_model, $this->metadataPool);
10397
}
10498

10599
public function testRefreshSpecialPrices()

0 commit comments

Comments
 (0)