@@ -54,12 +54,14 @@ protected function setUp()
54
54
'getControllerName ' ,
55
55
'getModuleName ' ,
56
56
'getActionName ' ,
57
+ 'getRequestUri ' ,
57
58
'getParam ' ,
58
59
'setParams ' ,
59
60
'getParams ' ,
60
61
'setModuleName ' ,
61
62
'isSecure ' ,
62
63
'setActionName ' ,
64
+ 'setRequestUri ' ,
63
65
'getCookie '
64
66
],
65
67
[],
@@ -122,6 +124,9 @@ public function testGetScriptOptions($isSecure, $url, $expectedResult)
122
124
$ this ->requestMock ->expects ($ this ->once ())
123
125
->method ('getActionName ' )
124
126
->will ($ this ->returnValue ('action ' ));
127
+ $ this ->requestMock ->expects ($ this ->once ())
128
+ ->method ('getRequestUri ' )
129
+ ->will ($ this ->returnValue ('uri ' ));
125
130
$ this ->urlBuilderMock ->expects ($ this ->once ())
126
131
->method ('getUrl ' )
127
132
->willReturn ($ url );
@@ -153,10 +158,11 @@ public function getScriptOptionsDataProvider()
153
158
* @param string $route
154
159
* @param string $controller
155
160
* @param string $action
161
+ * @param string $uri
156
162
* @param string $expectedResult
157
163
* @dataProvider getScriptOptionsPrivateContentDataProvider
158
164
*/
159
- public function testGetScriptOptionsPrivateContent ($ url , $ route , $ controller , $ action , $ expectedResult )
165
+ public function testGetScriptOptionsPrivateContent ($ url , $ route , $ controller , $ action , $ uri , $ expectedResult )
160
166
{
161
167
$ handles = [
162
168
'some ' ,
@@ -179,6 +185,10 @@ public function testGetScriptOptionsPrivateContent($url, $route, $controller, $a
179
185
->method ('getActionName ' )
180
186
->will ($ this ->returnValue ($ action ));
181
187
188
+ $ this ->requestMock ->expects ($ this ->once ())
189
+ ->method ('getRequestUri ' )
190
+ ->will ($ this ->returnValue ($ uri ));
191
+
182
192
$ this ->urlBuilderMock ->expects ($ this ->once ())
183
193
->method ('getUrl ' )
184
194
->willReturn ($ url );
@@ -191,14 +201,17 @@ public function testGetScriptOptionsPrivateContent($url, $route, $controller, $a
191
201
192
202
public function getScriptOptionsPrivateContentDataProvider ()
193
203
{
204
+ // @codingStandardsIgnoreStart
194
205
return [
195
206
'http ' => [
196
- 'url ' => 'http://some-name.com/page_cache/block/render ' ,
197
- 'route ' => 'route ' ,
198
- 'controller ' => 'controller ' ,
199
- 'action ' => 'action ' ,
200
- 'expectedResult ' => '~"originalRequest":{"route":"route","controller":"controller","action":"action"}~ '
207
+ 'url ' => 'http://some-name.com/page_cache/block/render ' ,
208
+ 'route ' => 'route ' ,
209
+ 'controller ' => 'controller ' ,
210
+ 'action ' => 'action ' ,
211
+ 'uri ' => 'uri ' ,
212
+ 'expectedResult ' => '~"originalRequest":{"route":"route","controller":"controller","action":"action","uri":"uri"}~ '
201
213
],
202
214
];
215
+ //@codingStandardsIgnoreEnd
203
216
}
204
217
}
0 commit comments