@@ -58,7 +58,7 @@ public function testSupportsAllConfigFormats()
58
58
'ips ' => array ('1.2.3.4 ' , '1.1.1.1 ' ),
59
59
'attributes ' => array ('_controller ' => 'fos.user_bundle.* ' ),
60
60
'additional_cacheable_status ' => array (100 , 500 ),
61
- 'match_response ' => array () ,
61
+ 'match_response ' => '' ,
62
62
// TODO 'match_response' => '',
63
63
),
64
64
'headers ' => array (
@@ -103,7 +103,7 @@ public function testSupportsAllConfigFormats()
103
103
'_foo ' => 'bar ' ,
104
104
),
105
105
'additional_cacheable_status ' => array (501 , 502 ),
106
- 'match_response ' => array () ,
106
+ 'match_response ' => '' ,
107
107
// TODO match_response
108
108
),
109
109
'tags ' => array ('a ' , 'b ' ),
@@ -124,7 +124,7 @@ public function testSupportsAllConfigFormats()
124
124
'_format ' => 'json ' ,
125
125
),
126
126
'additional_cacheable_status ' => array (404 , 403 ),
127
- 'match_response ' => array () ,
127
+ 'match_response ' => '' ,
128
128
// TODO match_response
129
129
),
130
130
'routes ' => array (
@@ -202,6 +202,57 @@ public function testSupportsNginx()
202
202
}
203
203
}
204
204
205
+ public function testSplitOptions ()
206
+ {
207
+ $ expectedConfiguration = $ this ->getEmptyConfig ();
208
+ $ expectedConfiguration ['cache_control ' ] = array (
209
+ 'rules ' => array (
210
+ array (
211
+ 'match ' => array (
212
+ 'path ' => null ,
213
+ 'host ' => null ,
214
+ 'attributes ' => array (),
215
+ 'additional_cacheable_status ' => array (),
216
+ 'match_response ' => null ,
217
+ 'methods ' => array ('GET ' , 'POST ' ),
218
+ 'ips ' => array ('1.2.3.4 ' , '1.1.1.1 ' ),
219
+ ),
220
+ 'headers ' => array (
221
+ 'reverse_proxy_ttl ' => null ,
222
+ 'vary ' => array ('Cookie ' , 'Authorization ' ),
223
+ ),
224
+ ),
225
+ ),
226
+ );
227
+ $ expectedConfiguration ['proxy_client ' ] = array (
228
+ 'varnish ' => array (
229
+ 'base_url ' => null ,
230
+ 'guzzle_client ' => null ,
231
+ 'servers ' => array ('1.1.1.1:80 ' , '2.2.2.2:80 ' ),
232
+ ),
233
+ 'nginx ' => array (
234
+ 'base_url ' => null ,
235
+ 'guzzle_client ' => null ,
236
+ 'purge_location ' => '' ,
237
+ 'servers ' => array ('1.1.1.1:81 ' , '2.2.2.2:81 ' ),
238
+ ),
239
+ );
240
+ $ expectedConfiguration ['cache_manager ' ]['enabled ' ] = 'auto ' ;
241
+ $ expectedConfiguration ['tags ' ]['enabled ' ] = 'auto ' ;
242
+ $ expectedConfiguration ['invalidation ' ]['enabled ' ] = 'auto ' ;
243
+
244
+ $ formats = array_map (function ($ path ) {
245
+ return __DIR__ .'/../../Resources/Fixtures/ ' .$ path ;
246
+ }, array (
247
+ 'config/split.yml ' ,
248
+ 'config/split.xml ' ,
249
+ 'config/split.php ' ,
250
+ ));
251
+
252
+ foreach ($ formats as $ format ) {
253
+ $ this ->assertProcessedConfigurationEquals ($ expectedConfiguration , array ($ format ));
254
+ }
255
+ }
205
256
206
257
public function testCacheManagerNoClient ()
207
258
{
0 commit comments