File tree Expand file tree Collapse file tree 4 files changed +8
-12
lines changed
Magento/TestFramework/TestCase
tests/unit/testsuite/Magento/Test/TestCase
ImportExport/Block/Adminhtml/Import/Edit Expand file tree Collapse file tree 4 files changed +8
-12
lines changed Original file line number Diff line number Diff line change @@ -268,14 +268,10 @@ protected function getCookieMessages($messageType = null)
268
268
{
269
269
/** @var $cookieManager CookieManagerInterface */
270
270
$ cookieManager = $ this ->_objectManager ->get (CookieManagerInterface::class);
271
- try {
272
- $ messages = \Zend_Json::decode (
273
- $ cookieManager ->getCookie (MessagePlugin::MESSAGES_COOKIES_NAME , \Zend_Json::encode ([]))
274
- );
275
- if (!is_array ($ messages )) {
276
- $ messages = [];
277
- }
278
- } catch (\Zend_Json_Exception $ e ) {
271
+ $ messages = json_decode (
272
+ $ cookieManager ->getCookie (MessagePlugin::MESSAGES_COOKIES_NAME , json_encode ([]))
273
+ );
274
+ if (!is_array ($ messages )) {
279
275
$ messages = [];
280
276
}
281
277
Original file line number Diff line number Diff line change @@ -244,6 +244,6 @@ private function addSessionMessages()
244
244
245
245
$ this ->cookieManagerMock ->expects ($ this ->any ())
246
246
->method ('getCookie ' )
247
- ->willReturn (\Zend_Json:: encode ($ cookieMessages ));
247
+ ->willReturn (json_encode ($ cookieMessages ));
248
248
}
249
249
}
Original file line number Diff line number Diff line change @@ -108,7 +108,7 @@ public function testLoadDefault()
108
108
$ this ->assertNotEmpty ($ this ->model ->getTemplateText ());
109
109
$ this ->assertNotEmpty ($ this ->model ->getTemplateSubject ());
110
110
$ this ->assertNotEmpty ($ this ->model ->getOrigTemplateVariables ());
111
- $ this ->assertInternalType ('array ' , \Zend_Json:: decode ($ this ->model ->getOrigTemplateVariables ()));
111
+ $ this ->assertInternalType ('array ' , json_decode ($ this ->model ->getOrigTemplateVariables ()));
112
112
}
113
113
114
114
/**
Original file line number Diff line number Diff line change @@ -93,7 +93,7 @@ protected function setUp()
93
93
public function testGetEntityBehaviors ()
94
94
{
95
95
$ actualEntities = $ this ->_model ->getEntityBehaviors ();
96
- $ expectedEntities = \Zend_Json:: encode ($ this ->_expectedEntities );
96
+ $ expectedEntities = json_encode ($ this ->_expectedEntities );
97
97
$ this ->assertEquals ($ expectedEntities , $ actualEntities );
98
98
}
99
99
@@ -105,7 +105,7 @@ public function testGetEntityBehaviors()
105
105
public function testGetUniqueBehaviors ()
106
106
{
107
107
$ actualBehaviors = $ this ->_model ->getUniqueBehaviors ();
108
- $ expectedBehaviors = \Zend_Json:: encode ($ this ->_expectedBehaviors );
108
+ $ expectedBehaviors = json_encode ($ this ->_expectedBehaviors );
109
109
$ this ->assertEquals ($ expectedBehaviors , $ actualBehaviors );
110
110
}
111
111
}
You can’t perform that action at this time.
0 commit comments