Skip to content

Commit 49a219f

Browse files
committed
Merge remote-tracking branch 'origin/BUG#AC-1486' into GL_Mainline_PR_25112021
2 parents dc00900 + 2b960c1 commit 49a219f

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

app/code/Magento/RemoteStorage/Driver/Adapter/Cache/Generic.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ public function flushCache(): void
217217
*
218218
* @param string $json
219219
*/
220-
public function setFromStorage(string $json)
220+
private function setFromStorage(string $json)
221221
{
222222
$this->cacheData = array_merge($this->cacheData, $this->serializer->unserialize($json));
223223
}

app/code/Magento/RemoteStorage/Test/Unit/Driver/Adpater/Cache/GenericTest.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,14 @@ protected function setUp(): void
5959
public function testGetMetaData(string $input, ?array $expectedOutput): void
6060
{
6161
$cacheData = include __DIR__ . '/_files/CacheData.php';
62+
$this->cacheAdapterMock
63+
->expects($this->once())
64+
->method('load')
65+
->willReturn(json_encode($cacheData));
6266
$this->serializerMock
67+
->expects($this->once())
6368
->method('unserialize')
6469
->willReturn($cacheData);
65-
$this->generic->setFromStorage(json_encode($cacheData));
6670

6771
$this->assertEquals($expectedOutput, $this->generic->getMetaData($input));
6872
}

0 commit comments

Comments
 (0)