@@ -283,7 +283,7 @@ public function test_settype_debugging_text() {
283
283
$ this ->assertDebuggingCalled ("Did you remember to call setType() for 'texttest'? Defaulting to PARAM_RAW cleaning. " );
284
284
285
285
// Check form still there though.
286
- $ this ->expectOutputRegex ('/<input[^>]*name="texttest [^>]*type="text / ' );
286
+ $ this ->expectOutputRegex ('/<input[^>]*type="text [^>]*name="texttest / ' );
287
287
$ mform ->display ();
288
288
}
289
289
@@ -303,7 +303,7 @@ public function test_settype_debugging_url() {
303
303
$ this ->assertDebuggingCalled ("Did you remember to call setType() for 'urltest'? Defaulting to PARAM_RAW cleaning. " );
304
304
305
305
// Check form still there though.
306
- $ this ->expectOutputRegex ('/<input[^>]*name="urltest" [^>]*type="text / ' );
306
+ $ this ->expectOutputRegex ('/<input[^>]*type="url [^>]*name="urltest" / ' );
307
307
$ mform ->display ();
308
308
}
309
309
@@ -312,63 +312,63 @@ public function test_settype_debugging_repeat() {
312
312
$ this ->assertDebuggingCalled ("Did you remember to call setType() for 'repeattest[0]'? Defaulting to PARAM_RAW cleaning. " );
313
313
314
314
// Check form still there though.
315
- $ this ->expectOutputRegex ('/<input[^>]*name="repeattest [^>]*type="text / ' );
315
+ $ this ->expectOutputRegex ('/<input[^>]*type="text [^>]*name="repeattest / ' );
316
316
$ mform ->display ();
317
317
}
318
318
319
319
public function test_settype_debugging_repeat_ok () {
320
320
$ mform = new formslib_settype_debugging_repeat_ok ();
321
321
// No debugging expected here.
322
322
323
- $ this ->expectOutputRegex ('/<input[^>]*name="repeattest [^>]*type="text / ' );
323
+ $ this ->expectOutputRegex ('/<input[^>]*type="text [^>]*name="repeattest / ' );
324
324
$ mform ->display ();
325
325
}
326
326
327
327
public function test_settype_debugging_group () {
328
328
$ mform = new formslib_settype_debugging_group ();
329
329
$ this ->assertDebuggingCalled ("Did you remember to call setType() for 'groupel1'? Defaulting to PARAM_RAW cleaning. " );
330
- $ this ->expectOutputRegex ('/<input[^>]*name="groupel1" [^>]*type="text / ' );
331
- $ this ->expectOutputRegex ('/<input[^>]*name="groupel2" [^>]*type="text / ' );
330
+ $ this ->expectOutputRegex ('/<input[^>]*type="text [^>]*name="groupel1" / ' );
331
+ $ this ->expectOutputRegex ('/<input[^>]*type="text [^>]*name="groupel2" / ' );
332
332
$ mform ->display ();
333
333
}
334
334
335
335
public function test_settype_debugging_namedgroup () {
336
336
$ mform = new formslib_settype_debugging_namedgroup ();
337
337
$ this ->assertDebuggingCalled ("Did you remember to call setType() for 'namedgroup[groupel1]'? Defaulting to PARAM_RAW cleaning. " );
338
- $ this ->expectOutputRegex ('/<input[^>]*name="namedgroup\[groupel1\]"[^>]*type="text / ' );
339
- $ this ->expectOutputRegex ('/<input[^>]*name="namedgroup\[groupel2\]"[^>]*type="text / ' );
338
+ $ this ->expectOutputRegex ('/<input[^>]*type="text[^>]* name="namedgroup\[groupel1\]"/ ' );
339
+ $ this ->expectOutputRegex ('/<input[^>]*type="text[^>]* name="namedgroup\[groupel2\]"/ ' );
340
340
$ mform ->display ();
341
341
}
342
342
343
343
public function test_settype_debugging_funky_name () {
344
344
$ mform = new formslib_settype_debugging_funky_name ();
345
345
$ this ->assertDebuggingCalled ("Did you remember to call setType() for 'blah[foo][bar][1]'? Defaulting to PARAM_RAW cleaning. " );
346
- $ this ->expectOutputRegex ('/<input[^>]*name="blah\[foo\]\[bar\]\[0\]"[^>]*type="text / ' );
347
- $ this ->expectOutputRegex ('/<input[^>]*name="blah\[foo\]\[bar\]\[1\]"[^>]*type="text / ' );
346
+ $ this ->expectOutputRegex ('/<input[^>]*type="text[^>]* name="blah\[foo\]\[bar\]\[0\]"/ ' );
347
+ $ this ->expectOutputRegex ('/<input[^>]*type="text[^>]* name="blah\[foo\]\[bar\]\[1\]"/ ' );
348
348
$ mform ->display ();
349
349
}
350
350
351
351
public function test_settype_debugging_type_inheritance () {
352
352
$ mform = new formslib_settype_debugging_type_inheritance ();
353
- $ this ->expectOutputRegex ('/<input[^>]*name="blah\[foo\]\[bar\]\[0\]"[^>]*type="text / ' );
354
- $ this ->expectOutputRegex ('/<input[^>]*name="blah\[bar\]\[foo\]\[1\]"[^>]*type="text / ' );
355
- $ this ->expectOutputRegex ('/<input[^>]*name="blah\[any\]\[other\]\[2\]"[^>]*type="text / ' );
353
+ $ this ->expectOutputRegex ('/<input[^>]*type="text[^>]* name="blah\[foo\]\[bar\]\[0\]"/ ' );
354
+ $ this ->expectOutputRegex ('/<input[^>]*type="text[^>]* name="blah\[bar\]\[foo\]\[1\]"/ ' );
355
+ $ this ->expectOutputRegex ('/<input[^>]*type="text[^>]* name="blah\[any\]\[other\]\[2\]"/ ' );
356
356
$ mform ->display ();
357
357
}
358
358
359
359
public function test_settype_debugging_type_group_in_repeat () {
360
360
$ mform = new formslib_settype_debugging_type_group_in_repeat ();
361
361
$ this ->assertDebuggingCalled ("Did you remember to call setType() for 'test2[0]'? Defaulting to PARAM_RAW cleaning. " );
362
- $ this ->expectOutputRegex ('/<input[^>]*name="test1\[0\]"[^>]*type="text / ' );
363
- $ this ->expectOutputRegex ('/<input[^>]*name="test2\[0\]"[^>]*type="text / ' );
362
+ $ this ->expectOutputRegex ('/<input[^>]*type="text[^>]* name="test1\[0\]"/ ' );
363
+ $ this ->expectOutputRegex ('/<input[^>]*type="text[^>]* name="test2\[0\]"/ ' );
364
364
$ mform ->display ();
365
365
}
366
366
367
367
public function test_settype_debugging_type_namedgroup_in_repeat () {
368
368
$ mform = new formslib_settype_debugging_type_namedgroup_in_repeat ();
369
369
$ this ->assertDebuggingCalled ("Did you remember to call setType() for 'namedgroup[0][test2]'? Defaulting to PARAM_RAW cleaning. " );
370
- $ this ->expectOutputRegex ('/<input[^>]*name="namedgroup\[0\]\[test1\]"[^>]*type="text / ' );
371
- $ this ->expectOutputRegex ('/<input[^>]*name="namedgroup\[0\]\[test2\]"[^>]*type="text / ' );
370
+ $ this ->expectOutputRegex ('/<input[^>]*type="text[^>]* name="namedgroup\[0\]\[test1\]"/ ' );
371
+ $ this ->expectOutputRegex ('/<input[^>]*type="text[^>]* name="namedgroup\[0\]\[test2\]"/ ' );
372
372
$ mform ->display ();
373
373
}
374
374
0 commit comments