Skip to content

Commit 2621e60

Browse files
committed
MAGETWO-66064: Remove usages of unserialize in module Magento/Catalog
1 parent c3f003e commit 2621e60

File tree

2 files changed

+2
-11
lines changed

2 files changed

+2
-11
lines changed

app/code/Magento/Catalog/Test/Unit/Model/ProductRepositoryTest.php

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -309,16 +309,7 @@ protected function setUp()
309309
->will(
310310
$this->returnCallback(
311311
function ($value) {
312-
return unserialize($value);
313-
}
314-
)
315-
);
316-
$this->serializerMock->expects($this->any())
317-
->method('serialize')
318-
->will(
319-
$this->returnCallback(
320-
function ($value) {
321-
return json_encode($value);
312+
return json_decode($value, true);
322313
}
323314
)
324315
);

app/code/Magento/Catalog/Test/Unit/Model/ResourceModel/CategoryTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ public function testFindWhereAttributeIs()
153153
->will(
154154
$this->returnCallback(
155155
function ($value) {
156-
return serialize($value);
156+
return json_encode($value);
157157
}
158158
)
159159
);

0 commit comments

Comments
 (0)