File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed
app/code/Magento/RemoteStorage
Test/Unit/Driver/Adpater/Cache Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -217,7 +217,7 @@ public function flushCache(): void
217
217
*
218
218
* @param string $json
219
219
*/
220
- public function setFromStorage (string $ json )
220
+ private function setFromStorage (string $ json )
221
221
{
222
222
$ this ->cacheData = array_merge ($ this ->cacheData , $ this ->serializer ->unserialize ($ json ));
223
223
}
Original file line number Diff line number Diff line change @@ -59,10 +59,14 @@ protected function setUp(): void
59
59
public function testGetMetaData (string $ input , ?array $ expectedOutput ): void
60
60
{
61
61
$ cacheData = include __DIR__ . '/_files/CacheData.php ' ;
62
+ $ this ->cacheAdapterMock
63
+ ->expects ($ this ->once ())
64
+ ->method ('load ' )
65
+ ->willReturn (json_encode ($ cacheData ));
62
66
$ this ->serializerMock
67
+ ->expects ($ this ->once ())
63
68
->method ('unserialize ' )
64
69
->willReturn ($ cacheData );
65
- $ this ->generic ->setFromStorage (json_encode ($ cacheData ));
66
70
67
71
$ this ->assertEquals ($ expectedOutput , $ this ->generic ->getMetaData ($ input ));
68
72
}
You can’t perform that action at this time.
0 commit comments