@@ -229,6 +229,17 @@ public function testFormPassword()
229
229
$ this ->assertEquals ('<input class="span2" name="foo" type="password" value=""> ' , $ form2 );
230
230
}
231
231
232
+ public function testFormRange ()
233
+ {
234
+ $ form1 = $ this ->formBuilder ->range ('foo ' );
235
+ $ form2 = $ this ->formBuilder ->range ('foo ' , 1 );
236
+ $ form3 = $ this ->formBuilder ->range ('foo ' , null , ['class ' => 'span2 ' ]);
237
+
238
+ $ this ->assertEquals ('<input name="foo" type="range"> ' , $ form1 );
239
+ $ this ->assertEquals ('<input name="foo" type="range" value="1"> ' , $ form2 );
240
+ $ this ->assertEquals ('<input class="span2" name="foo" type="range"> ' , $ form3 );
241
+ }
242
+
232
243
public function testFormHidden ()
233
244
{
234
245
$ form1 = $ this ->formBuilder ->hidden ('foo ' );
@@ -240,6 +251,18 @@ public function testFormHidden()
240
251
$ this ->assertEquals ('<input class="span2" name="foo" type="hidden"> ' , $ form3 );
241
252
}
242
253
254
+ public function testFormMonth ()
255
+ {
256
+ $ form1 = $ this ->formBuilder ->month ('foo ' );
257
+ $ form2 = $ this ->formBuilder ->month ('foo ' , \Carbon \Carbon::now ());
258
+ $ form3 = $ this ->formBuilder ->month ('foo ' , null , ['class ' => 'span2 ' ]);
259
+
260
+ $ this ->assertEquals ('<input name="foo" type="month"> ' , $ form1 );
261
+ $ this ->assertEquals ('<input name="foo" type="month" value=" ' . \Carbon \Carbon::now ()->format ('Y-m ' ) . '"> ' ,
262
+ $ form2 );
263
+ $ this ->assertEquals ('<input class="span2" name="foo" type="month"> ' , $ form3 );
264
+ }
265
+
243
266
public function testFormSearch ()
244
267
{
245
268
$ form1 = $ this ->formBuilder ->search ('foo ' );
@@ -310,6 +333,29 @@ public function testFormTime()
310
333
$ this ->assertEquals ('<input class="span2" name="foo" type="time"> ' , $ form3 );
311
334
}
312
335
336
+ public function testFormUrl ()
337
+ {
338
+ $ form1 = $ this ->formBuilder ->url ('foo ' );
339
+ $ form2 = $ this ->formBuilder ->url ('foo ' , 'http://foobar.com ' );
340
+ $ form3 = $ this ->formBuilder ->url ('foo ' , null , ['class ' => 'span2 ' ]);
341
+
342
+ $ this ->assertEquals ('<input name="foo" type="url"> ' , $ form1 );
343
+ $ this ->assertEquals ('<input name="foo" type="url" value="http://foobar.com"> ' , $ form2 );
344
+ $ this ->assertEquals ('<input class="span2" name="foo" type="url"> ' , $ form3 );
345
+ }
346
+
347
+ public function testFormWeek ()
348
+ {
349
+ $ form1 = $ this ->formBuilder ->week ('foo ' );
350
+ $ form2 = $ this ->formBuilder ->week ('foo ' , \Carbon \Carbon::now ());
351
+ $ form3 = $ this ->formBuilder ->week ('foo ' , null , ['class ' => 'span2 ' ]);
352
+
353
+ $ this ->assertEquals ('<input name="foo" type="week"> ' , $ form1 );
354
+ $ this ->assertEquals ('<input name="foo" type="week" value=" ' . \Carbon \Carbon::now ()->format ('Y-\WW ' ) . '"> ' ,
355
+ $ form2 );
356
+ $ this ->assertEquals ('<input class="span2" name="foo" type="week"> ' , $ form3 );
357
+ }
358
+
313
359
public function testFormFile ()
314
360
{
315
361
$ form1 = $ this ->formBuilder ->file ('foo ' );
0 commit comments