File tree Expand file tree Collapse file tree 7 files changed +15
-22
lines changed
dev/tests/integration/testsuite/Magento/Customer/Block/Adminhtml/Edit/Tab Expand file tree Collapse file tree 7 files changed +15
-22
lines changed Original file line number Diff line number Diff line change @@ -74,7 +74,8 @@ public function getJsLayout()
74
74
foreach ($ this ->layoutProcessors as $ processor ) {
75
75
$ this ->jsLayout = $ processor ->process ($ this ->jsLayout );
76
76
}
77
- return $ this ->serializer ->serialize ($ this ->jsLayout );
77
+
78
+ return json_encode ($ this ->jsLayout , JSON_HEX_TAG );
78
79
}
79
80
80
81
/**
@@ -94,6 +95,6 @@ public function getBaseUrl()
94
95
*/
95
96
public function getSerializedCheckoutConfig ()
96
97
{
97
- return $ this -> serializer -> serialize ($ this ->getCheckoutConfig ());
98
+ return json_encode ($ this ->getCheckoutConfig (), JSON_HEX_TAG );
98
99
}
99
100
}
Original file line number Diff line number Diff line change @@ -69,7 +69,8 @@ public function getJsLayout()
69
69
foreach ($ this ->layoutProcessors as $ processor ) {
70
70
$ this ->jsLayout = $ processor ->process ($ this ->jsLayout );
71
71
}
72
- return parent ::getJsLayout ();
72
+
73
+ return json_encode ($ this ->jsLayout , JSON_HEX_TAG );
73
74
}
74
75
75
76
/**
Original file line number Diff line number Diff line change @@ -77,7 +77,8 @@ public function getJsLayout()
77
77
foreach ($ this ->layoutProcessors as $ processor ) {
78
78
$ this ->jsLayout = $ processor ->process ($ this ->jsLayout );
79
79
}
80
- return $ this ->serializer ->serialize ($ this ->jsLayout );
80
+
81
+ return json_encode ($ this ->jsLayout , JSON_HEX_TAG );
81
82
}
82
83
83
84
/**
@@ -119,6 +120,6 @@ public function getBaseUrl()
119
120
*/
120
121
public function getSerializedCheckoutConfig ()
121
122
{
122
- return $ this -> serializer -> serialize ($ this ->getCheckoutConfig ());
123
+ return json_encode ($ this ->getCheckoutConfig (), JSON_HEX_TAG );
123
124
}
124
125
}
Original file line number Diff line number Diff line change @@ -99,9 +99,6 @@ public function testGetJsLayout()
99
99
->with ($ this ->layout )
100
100
->willReturn ($ layoutProcessed );
101
101
102
- $ this ->serializer ->expects ($ this ->once ())->method ('serialize ' )->will (
103
- $ this ->returnValue ($ jsonLayoutProcessed )
104
- );
105
102
$ this ->assertEquals (
106
103
$ jsonLayoutProcessed ,
107
104
$ this ->model ->getJsLayout ()
@@ -121,9 +118,6 @@ public function testGetSerializedCheckoutConfig()
121
118
{
122
119
$ checkoutConfig = ['checkout ' , 'config ' ];
123
120
$ this ->configProvider ->expects ($ this ->once ())->method ('getConfig ' )->willReturn ($ checkoutConfig );
124
- $ this ->serializer ->expects ($ this ->once ())->method ('serialize ' )->will (
125
- $ this ->returnValue (json_encode ($ checkoutConfig ))
126
- );
127
121
128
122
$ this ->assertEquals (json_encode ($ checkoutConfig ), $ this ->model ->getSerializedCheckoutConfig ());
129
123
}
Original file line number Diff line number Diff line change @@ -93,9 +93,6 @@ public function testGetJsLayout()
93
93
$ processedLayout = ['layout ' => ['processed ' => true ]];
94
94
$ jsonLayout = '{"layout":{"processed":true}} ' ;
95
95
$ this ->layoutProcessorMock ->expects ($ this ->once ())->method ('process ' )->with ([])->willReturn ($ processedLayout );
96
- $ this ->serializer ->expects ($ this ->once ())->method ('serialize ' )->will (
97
- $ this ->returnValue (json_encode ($ processedLayout ))
98
- );
99
96
100
97
$ this ->assertEquals ($ jsonLayout , $ this ->model ->getJsLayout ());
101
98
}
@@ -104,9 +101,6 @@ public function testGetSerializedCheckoutConfig()
104
101
{
105
102
$ checkoutConfig = ['checkout ' , 'config ' ];
106
103
$ this ->configProviderMock ->expects ($ this ->once ())->method ('getConfig ' )->willReturn ($ checkoutConfig );
107
- $ this ->serializer ->expects ($ this ->once ())->method ('serialize ' )->will (
108
- $ this ->returnValue (json_encode ($ checkoutConfig ))
109
- );
110
104
111
105
$ this ->assertEquals (json_encode ($ checkoutConfig ), $ this ->model ->getSerializedCheckoutConfig ());
112
106
}
Original file line number Diff line number Diff line change @@ -80,7 +80,9 @@ public function getDocumentElement()
80
80
*/
81
81
public function appendLayoutConfiguration ()
82
82
{
83
- $ layoutConfiguration = $ this ->wrapContent (json_encode ($ this ->structure ->generate ($ this ->component )));
83
+ $ layoutConfiguration = $ this ->wrapContent (
84
+ json_encode ($ this ->structure ->generate ($ this ->component ), JSON_HEX_TAG )
85
+ );
84
86
$ this ->template ->append ($ layoutConfiguration );
85
87
}
86
88
Original file line number Diff line number Diff line change @@ -65,10 +65,10 @@ public function testRenderingNewsletterBlock()
65
65
$ this ->dispatch ('backend/customer/index/edit ' );
66
66
$ body = $ this ->getResponse ()->getBody ();
67
67
68
- $ this ->assertContains ('<span>Newsletter Information<\ /span> ' , $ body );
69
- $ this ->assertContains ('<input id=\"_newslettersubscription\" ' , $ body );
68
+ $ this ->assertContains ('\u003Cspan\u003ENewsletter Information\u003C\ /span\u003E ' , $ body );
69
+ $ this ->assertContains ('\u003Cinput id=\"_newslettersubscription\" ' , $ body );
70
70
$ this ->assertNotContains ('checked="checked" ' , $ body );
71
- $ this ->assertContains ('<span>Subscribed to Newsletter<\ /span> ' , $ body );
72
- $ this ->assertContains ('>No Newsletter Found< ' , $ body );
71
+ $ this ->assertContains ('\u003Cspan\u003ESubscribed to Newsletter\u003C\ /span\u003E ' , $ body );
72
+ $ this ->assertContains ('\u003ENo Newsletter Found\u003C ' , $ body );
73
73
}
74
74
}
You can’t perform that action at this time.
0 commit comments