File tree Expand file tree Collapse file tree 1 file changed +10
-9
lines changed
app/code/Magento/Config/Test/Unit/App/Config/Type Expand file tree Collapse file tree 1 file changed +10
-9
lines changed Original file line number Diff line number Diff line change @@ -88,7 +88,7 @@ public function testGet($isCached)
88
88
{
89
89
$ path = 'default/dev/unsecure/url ' ;
90
90
$ url = 'http://magento.test/ ' ;
91
- $ data = [
91
+ $ unserializedData = [
92
92
'default ' => [
93
93
'dev ' => [
94
94
'unsecure ' => [
@@ -97,41 +97,42 @@ public function testGet($isCached)
97
97
]
98
98
]
99
99
];
100
+ $ serializedDataString = '{"serialized-data"} ' ;
100
101
101
102
$ this ->cache ->expects ($ this ->once ())
102
103
->method ('load ' )
103
104
->with (System::CONFIG_TYPE )
104
- ->willReturn ($ isCached ? $ data : null );
105
+ ->willReturn ($ isCached ? $ unserializedData : null );
105
106
106
107
if ($ isCached ) {
107
108
$ this ->serializer ->expects ($ this ->once ())
108
109
->method ('unserialize ' )
109
- ->willReturn ($ data );
110
+ ->willReturn ($ unserializedData );
110
111
}
111
112
112
113
if (!$ isCached ) {
113
114
$ this ->serializer ->expects ($ this ->once ())
114
115
->method ('serialize ' )
115
- ->willReturn (serialize ( $ data ) );
116
+ ->willReturn ($ serializedDataString );
116
117
$ this ->source ->expects ($ this ->once ())
117
118
->method ('get ' )
118
- ->willReturn ($ data );
119
+ ->willReturn ($ unserializedData );
119
120
$ this ->fallback ->expects ($ this ->once ())
120
121
->method ('process ' )
121
- ->with ($ data )
122
+ ->with ($ unserializedData )
122
123
->willReturnArgument (0 );
123
124
$ this ->preProcessor ->expects ($ this ->once ())
124
125
->method ('process ' )
125
- ->with ($ data )
126
+ ->with ($ unserializedData )
126
127
->willReturnArgument (0 );
127
128
$ this ->postProcessor ->expects ($ this ->once ())
128
129
->method ('process ' )
129
- ->with ($ data )
130
+ ->with ($ unserializedData )
130
131
->willReturnArgument (0 );
131
132
$ this ->cache ->expects ($ this ->once ())
132
133
->method ('save ' )
133
134
->with (
134
- serialize ( $ data ) ,
135
+ $ serializedDataString ,
135
136
System::CONFIG_TYPE ,
136
137
[System::CACHE_TAG ]
137
138
);
You can’t perform that action at this time.
0 commit comments