@@ -96,10 +96,7 @@ public function testRest()
96
96
$ html = $ this ->renderRest ($ view );
97
97
98
98
$ this ->assertMatchesXpath ($ html ,
99
- '/input
100
- [@type="hidden"]
101
- [@id="name__token"]
102
- /following-sibling::div
99
+ '/div
103
100
[
104
101
./label[@for="name_field1"]
105
102
/following-sibling::input[@type="text"][@id="name_field1"]
@@ -112,6 +109,9 @@ public function testRest()
112
109
[count(../div)=2]
113
110
[count(..//label)=2]
114
111
[count(..//input)=3]
112
+ /following-sibling::input
113
+ [@type="hidden"]
114
+ [@id="name__token"]
115
115
'
116
116
);
117
117
}
@@ -144,8 +144,7 @@ public function testRestWithChildrenForms()
144
144
$ html = $ this ->renderRest ($ view );
145
145
146
146
$ this ->assertMatchesXpath ($ html ,
147
- '/input[@type="hidden"][@id="parent__token"]
148
- /following-sibling::div
147
+ '/div
149
148
[
150
149
./label[not(@for)]
151
150
/following-sibling::div[@id="parent_child1"]
@@ -172,6 +171,7 @@ public function testRestWithChildrenForms()
172
171
]
173
172
[count(//label)=4]
174
173
[count(//input[@type="text"])=2]
174
+ /following-sibling::input[@type="hidden"][@id="parent__token"]
175
175
'
176
176
);
177
177
}
@@ -189,15 +189,15 @@ public function testRestAndRepeatedWithRow()
189
189
$ html = $ this ->renderRest ($ view );
190
190
191
191
$ this ->assertMatchesXpath ($ html ,
192
- '/input
193
- [@type="hidden"]
194
- [@id="name__token"]
195
- /following-sibling::div
192
+ '/div
196
193
[
197
194
./label[@for="name_first"]
198
195
/following-sibling::input[@type="text"][@id="name_first"]
199
196
]
200
197
[count(.//input)=1]
198
+ /following-sibling::input
199
+ [@type="hidden"]
200
+ [@id="name__token"]
201
201
'
202
202
);
203
203
}
@@ -216,16 +216,16 @@ public function testRestAndRepeatedWithRowPerChild()
216
216
$ html = $ this ->renderRest ($ view );
217
217
218
218
$ this ->assertMatchesXpath ($ html ,
219
- '/input
220
- [@type="hidden"]
221
- [@id="name__token"]
222
- /following-sibling::div
219
+ '/div
223
220
[
224
221
./label[@for="name_first"]
225
222
/following-sibling::input[@type="text"][@id="name_first"]
226
223
]
227
224
[count(.//input)=1]
228
225
[count(.//label)=1]
226
+ /following-sibling::input
227
+ [@type="hidden"]
228
+ [@id="name__token"]
229
229
'
230
230
);
231
231
}
@@ -246,16 +246,16 @@ public function testRestAndRepeatedWithWidgetPerChild()
246
246
$ html = $ this ->renderRest ($ view );
247
247
248
248
$ this ->assertMatchesXpath ($ html ,
249
- '/input
250
- [@type="hidden"]
251
- [@id="name__token"]
252
- /following-sibling::div
249
+ '/div
253
250
[
254
251
./label[@for="name_first"]
255
252
/following-sibling::input[@type="text"][@id="name_first"]
256
253
]
257
254
[count(//input)=2]
258
255
[count(//label)=1]
256
+ /following-sibling::input
257
+ [@type="hidden"]
258
+ [@id="name__token"]
259
259
'
260
260
);
261
261
}
@@ -293,8 +293,7 @@ public function testCollectionRow()
293
293
$ this ->assertWidgetMatchesXpath ($ form ->createView (), array (),
294
294
'/div
295
295
[
296
- ./input[@type="hidden"][@id="form__token"]
297
- /following-sibling::div
296
+ ./div
298
297
[
299
298
./label[not(@for)]
300
299
/following-sibling::div
@@ -311,6 +310,7 @@ public function testCollectionRow()
311
310
]
312
311
]
313
312
]
313
+ /following-sibling::input[@type="hidden"][@id="form__token"]
314
314
]
315
315
[count(.//input)=3]
316
316
'
@@ -327,8 +327,7 @@ public function testForm()
327
327
$ this ->assertWidgetMatchesXpath ($ form ->createView (), array (),
328
328
'/div
329
329
[
330
- ./input[@type="hidden"][@id="name__token"]
331
- /following-sibling::div
330
+ ./div
332
331
[
333
332
./label[@for="name_firstName"]
334
333
/following-sibling::input[@type="text"][@id="name_firstName"]
@@ -338,6 +337,7 @@ public function testForm()
338
337
./label[@for="name_lastName"]
339
338
/following-sibling::input[@type="text"][@id="name_lastName"]
340
339
]
340
+ /following-sibling::input[@type="hidden"][@id="name__token"]
341
341
]
342
342
[count(.//input)=3]
343
343
'
@@ -383,8 +383,8 @@ public function testCsrf()
383
383
$ this ->assertWidgetMatchesXpath ($ form ->createView (), array (),
384
384
'/div
385
385
[
386
- ./input[@type="hidden"][@id="name__token"][@value="foo&bar"]
387
- /following-sibling::div
386
+ ./div
387
+ /following-sibling::input[@type="hidden"][@id="name__token"][@value="foo&bar"]
388
388
]
389
389
[count(.//input[@type="hidden"])=1]
390
390
'
@@ -400,8 +400,7 @@ public function testRepeated()
400
400
$ this ->assertWidgetMatchesXpath ($ form ->createView (), array (),
401
401
'/div
402
402
[
403
- ./input[@type="hidden"][@id="name__token"]
404
- /following-sibling::div
403
+ ./div
405
404
[
406
405
./label[@for="name_first"]
407
406
/following-sibling::input[@type="text"][@id="name_first"]
@@ -411,6 +410,7 @@ public function testRepeated()
411
410
./label[@for="name_second"]
412
411
/following-sibling::input[@type="text"][@id="name_second"]
413
412
]
413
+ /following-sibling::input[@type="hidden"][@id="name__token"]
414
414
]
415
415
[count(.//input)=3]
416
416
'
@@ -428,8 +428,7 @@ public function testRepeatedWithCustomOptions()
428
428
$ this ->assertWidgetMatchesXpath ($ form ->createView (), array (),
429
429
'/div
430
430
[
431
- ./input[@type="hidden"][@id="name__token"]
432
- /following-sibling::div
431
+ ./div
433
432
[
434
433
./label[@for="name_first"][.="[trans]Test[/trans]"]
435
434
/following-sibling::input[@type="text"][@id="name_first"][@required="required"]
@@ -439,6 +438,7 @@ public function testRepeatedWithCustomOptions()
439
438
./label[@for="name_second"][.="[trans]Test2[/trans]"]
440
439
/following-sibling::input[@type="text"][@id="name_second"][@required="required"]
441
440
]
441
+ /following-sibling::input[@type="hidden"][@id="name__token"]
442
442
]
443
443
[count(.//input)=3]
444
444
'
@@ -454,12 +454,12 @@ public function testSearchInputName()
454
454
$ this ->assertWidgetMatchesXpath ($ form ->createView (), array (),
455
455
'/div
456
456
[
457
- ./input[@type="hidden"][@id="full__token"]
458
- /following-sibling::div
457
+ ./div
459
458
[
460
459
./label[@for="full_name"]
461
460
/following-sibling::input[@type="search"][@id="full_name"][@name="full[name]"]
462
461
]
462
+ /following-sibling::input[@type="hidden"][@id="full__token"]
463
463
]
464
464
[count(//input)=2]
465
465
'
@@ -521,8 +521,7 @@ public function testThemeInheritance($parentTheme, $childTheme)
521
521
$ this ->assertWidgetMatchesXpath ($ view , array (),
522
522
'/div
523
523
[
524
- ./input[@type="hidden"]
525
- /following-sibling::div
524
+ ./div
526
525
[
527
526
./label[.="parent"]
528
527
/following-sibling::input[@type="text"]
@@ -539,6 +538,7 @@ public function testThemeInheritance($parentTheme, $childTheme)
539
538
]
540
539
]
541
540
]
541
+ /following-sibling::input[@type="hidden"]
542
542
]
543
543
'
544
544
);
0 commit comments