@@ -125,7 +125,7 @@ public function testInitializeCallback() {
125
125
public function testInitializeContentTypeSettingExt () {
126
126
$ event = new Event ('Controller.initialize ' , $ this ->Controller );
127
127
$ _SERVER ['HTTP_ACCEPT ' ] = 'application/json ' ;
128
- Router::extensions ('json ' , [ ' merge ' => false ] );
128
+ Router::extensions ('json ' , false );
129
129
130
130
$ this ->assertNull ($ this ->RequestHandler ->ext );
131
131
@@ -143,7 +143,7 @@ public function testInitializeContentTypeWithjQueryAccept() {
143
143
$ _SERVER ['HTTP_X_REQUESTED_WITH ' ] = 'XMLHttpRequest ' ;
144
144
$ event = new Event ('Controller.initialize ' , $ this ->Controller );
145
145
$ this ->assertNull ($ this ->RequestHandler ->ext );
146
- Router::extensions ('json ' , [ ' merge ' => false ] );
146
+ Router::extensions ('json ' , false );
147
147
148
148
$ this ->RequestHandler ->initialize ($ event );
149
149
$ this ->assertEquals ('json ' , $ this ->RequestHandler ->ext );
@@ -158,7 +158,7 @@ public function testInitializeContentTypeWithjQueryTextPlainAccept() {
158
158
$ _SERVER ['HTTP_ACCEPT ' ] = 'text/plain, */*; q=0.01 ' ;
159
159
$ event = new Event ('Controller.initialize ' , $ this ->Controller );
160
160
$ this ->assertNull ($ this ->RequestHandler ->ext );
161
- Router::extensions ('csv ' , [ ' merge ' => false ] );
161
+ Router::extensions ('csv ' , false );
162
162
163
163
$ this ->RequestHandler ->initialize ($ event );
164
164
$ this ->assertNull ($ this ->RequestHandler ->ext );
@@ -174,7 +174,7 @@ public function testInitializeContentTypeWithjQueryAcceptAndMultiplesExtensions(
174
174
$ _SERVER ['HTTP_ACCEPT ' ] = 'application/json, application/javascript, */*; q=0.01 ' ;
175
175
$ event = new Event ('Controller.initialize ' , $ this ->Controller );
176
176
$ this ->assertNull ($ this ->RequestHandler ->ext );
177
- Router::extensions (['rss ' , 'json ' ], [ ' merge ' => false ] );
177
+ Router::extensions (['rss ' , 'json ' ], false );
178
178
179
179
$ this ->RequestHandler ->initialize ($ event );
180
180
$ this ->assertEquals ('json ' , $ this ->RequestHandler ->ext );
@@ -189,7 +189,7 @@ public function testInitializeNoContentTypeWithSingleAccept() {
189
189
$ _SERVER ['HTTP_ACCEPT ' ] = 'application/json, text/html, */*; q=0.01 ' ;
190
190
$ event = new Event ('Controller.initialize ' , $ this ->Controller );
191
191
$ this ->assertNull ($ this ->RequestHandler ->ext );
192
- Router::extensions ('json ' , [ ' merge ' => false ] );
192
+ Router::extensions ('json ' , false );
193
193
194
194
$ this ->RequestHandler ->initialize ($ event );
195
195
$ this ->assertNull ($ this ->RequestHandler ->ext );
@@ -207,13 +207,13 @@ public function testInitializeNoContentTypeWithMultipleAcceptedTypes() {
207
207
$ _SERVER ['HTTP_ACCEPT ' ] = 'application/json, application/javascript, application/xml, */*; q=0.01 ' ;
208
208
$ event = new Event ('Controller.initialize ' , $ this ->Controller );
209
209
$ this ->assertNull ($ this ->RequestHandler ->ext );
210
- Router::extensions (['xml ' , 'json ' ], [ ' merge ' => false ] );
210
+ Router::extensions (['xml ' , 'json ' ], false );
211
211
212
212
$ this ->RequestHandler ->initialize ($ event );
213
213
$ this ->assertEquals ('xml ' , $ this ->RequestHandler ->ext );
214
214
215
215
$ this ->RequestHandler ->ext = null ;
216
- Router::extensions (array ('json ' , 'xml ' ), [ ' merge ' => false ] );
216
+ Router::extensions (array ('json ' , 'xml ' ), false );
217
217
218
218
$ this ->RequestHandler ->initialize ($ event );
219
219
$ this ->assertEquals ('json ' , $ this ->RequestHandler ->ext );
@@ -228,7 +228,7 @@ public function testInitializeContentTypeWithMultipleAcceptedTypes() {
228
228
$ _SERVER ['HTTP_ACCEPT ' ] = 'text/csv;q=1.0, application/json;q=0.8, application/xml;q=0.7 ' ;
229
229
$ event = new Event ('Controller.initialize ' , $ this ->Controller );
230
230
$ this ->assertNull ($ this ->RequestHandler ->ext );
231
- Router::extensions (['xml ' , 'json ' ], [ ' merge ' => false ] );
231
+ Router::extensions (['xml ' , 'json ' ], false );
232
232
233
233
$ this ->RequestHandler ->initialize ($ event );
234
234
$ this ->assertEquals ('json ' , $ this ->RequestHandler ->ext );
@@ -243,7 +243,7 @@ public function testInitializeAmbiguousAndroidAccepts() {
243
243
$ _SERVER ['HTTP_ACCEPT ' ] = 'application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 ' ;
244
244
$ event = new Event ('Controller.initialize ' , $ this ->Controller );
245
245
$ this ->assertNull ($ this ->RequestHandler ->ext );
246
- Router::extensions (['html ' , 'xml ' ], [ ' merge ' => false ] );
246
+ Router::extensions (['html ' , 'xml ' ], false );
247
247
248
248
$ this ->RequestHandler ->initialize ($ event );
249
249
$ this ->assertNull ($ this ->RequestHandler ->ext );
@@ -256,7 +256,7 @@ public function testInitializeAmbiguousAndroidAccepts() {
256
256
*/
257
257
public function testInititalizeFirefoxHeaderNotXml () {
258
258
$ _SERVER ['HTTP_ACCEPT ' ] = 'text/html,application/xhtml+xml,application/xml;image/png,image/jpeg,image/*;q=0.9,*/*;q=0.8 ' ;
259
- Router::extensions (['xml ' , 'json ' ], [ ' merge ' => false ] );
259
+ Router::extensions (['xml ' , 'json ' ], false );
260
260
261
261
$ event = new Event ('Controller.initialize ' , $ this ->Controller );
262
262
$ this ->RequestHandler ->initialize ($ event );
@@ -272,7 +272,7 @@ public function testInitializeContentTypeAndExtensionMismatch() {
272
272
$ event = new Event ('Controller.initialize ' , $ this ->Controller );
273
273
$ this ->assertNull ($ this ->RequestHandler ->ext );
274
274
$ extensions = Router::extensions ();
275
- Router::extensions ('xml ' , [ ' merge ' => false ] );
275
+ Router::extensions ('xml ' , false );
276
276
277
277
$ this ->Controller ->request = $ this ->getMock ('Cake\Network\Request ' , ['accepts ' ]);
278
278
$ this ->Controller ->request ->expects ($ this ->any ())
@@ -282,7 +282,7 @@ public function testInitializeContentTypeAndExtensionMismatch() {
282
282
$ this ->RequestHandler ->initialize ($ event );
283
283
$ this ->assertNull ($ this ->RequestHandler ->ext );
284
284
285
- call_user_func_array (array ('Cake\Routing\Router ' , 'extensions ' ), [$ extensions , [ ' merge ' => false ] ]);
285
+ call_user_func_array (array ('Cake\Routing\Router ' , 'extensions ' ), [$ extensions , false ]);
286
286
}
287
287
288
288
/**
@@ -359,7 +359,7 @@ public function testAutoAjaxLayout() {
359
359
* @return void
360
360
*/
361
361
public function testJsonViewLoaded () {
362
- Router::extensions (['json ' , 'xml ' , 'ajax ' ], [ ' merge ' => false ] );
362
+ Router::extensions (['json ' , 'xml ' , 'ajax ' ], false );
363
363
$ this ->Controller ->request ->params ['_ext ' ] = 'json ' ;
364
364
$ event = new Event ('Controller.startup ' , $ this ->Controller );
365
365
$ this ->RequestHandler ->initialize ($ event );
@@ -376,7 +376,7 @@ public function testJsonViewLoaded() {
376
376
* @return void
377
377
*/
378
378
public function testXmlViewLoaded () {
379
- Router::extensions (['json ' , 'xml ' , 'ajax ' ], [ ' merge ' => false ] );
379
+ Router::extensions (['json ' , 'xml ' , 'ajax ' ], false );
380
380
$ this ->Controller ->request ->params ['_ext ' ] = 'xml ' ;
381
381
$ event = new Event ('Controller.startup ' , $ this ->Controller );
382
382
$ this ->RequestHandler ->initialize ($ event );
@@ -393,7 +393,7 @@ public function testXmlViewLoaded() {
393
393
* @return void
394
394
*/
395
395
public function testAjaxViewLoaded () {
396
- Router::extensions (['json ' , 'xml ' , 'ajax ' ], [ ' merge ' => false ] );
396
+ Router::extensions (['json ' , 'xml ' , 'ajax ' ], false );
397
397
$ this ->Controller ->request ->params ['_ext ' ] = 'ajax ' ;
398
398
$ event = new Event ('Controller.startup ' , $ this ->Controller );
399
399
$ this ->RequestHandler ->initialize ($ event );
@@ -409,7 +409,7 @@ public function testAjaxViewLoaded() {
409
409
* @return void
410
410
*/
411
411
public function testNoViewClassExtension () {
412
- Router::extensions (['json ' , 'xml ' , 'ajax ' , 'csv ' ], [ ' merge ' => false ] );
412
+ Router::extensions (['json ' , 'xml ' , 'ajax ' , 'csv ' ], false );
413
413
$ this ->Controller ->request ->params ['_ext ' ] = 'csv ' ;
414
414
$ event = new Event ('Controller.startup ' , $ this ->Controller );
415
415
$ this ->RequestHandler ->initialize ($ event );
0 commit comments