@@ -24,21 +24,21 @@ protected function setUp()
24
24
}
25
25
26
26
/**
27
- * @expectedException Symfony\Component\OptionsResolver\Exception\InvalidOptionsException
27
+ * @expectedException \ Symfony\Component\OptionsResolver\Exception\InvalidOptionsException
28
28
*/
29
29
public function testInvalidWidgetOption ()
30
30
{
31
- $ form = $ this ->factory ->create ('date ' , null , array (
31
+ $ this ->factory ->create ('date ' , null , array (
32
32
'widget ' => 'fake_widget ' ,
33
33
));
34
34
}
35
35
36
36
/**
37
- * @expectedException Symfony\Component\OptionsResolver\Exception\InvalidOptionsException
37
+ * @expectedException \ Symfony\Component\OptionsResolver\Exception\InvalidOptionsException
38
38
*/
39
39
public function testInvalidInputOption ()
40
40
{
41
- $ form = $ this ->factory ->create ('date ' , null , array (
41
+ $ this ->factory ->create ('date ' , null , array (
42
42
'input ' => 'fake_input ' ,
43
43
));
44
44
}
@@ -271,7 +271,7 @@ public function testSubmitFromInputRawDifferentPattern()
271
271
* This test is to check that the strings '0', '1', '2', '3' are no accepted
272
272
* as valid IntlDateFormatter constants for FULL, LONG, MEDIUM or SHORT respectively.
273
273
*
274
- * @expectedException Symfony\Component\OptionsResolver\Exception\InvalidOptionsException
274
+ * @expectedException \ Symfony\Component\OptionsResolver\Exception\InvalidOptionsException
275
275
*/
276
276
public function testThrowExceptionIfFormatIsNoPattern ()
277
277
{
@@ -283,7 +283,7 @@ public function testThrowExceptionIfFormatIsNoPattern()
283
283
}
284
284
285
285
/**
286
- * @expectedException Symfony\Component\OptionsResolver\Exception\InvalidOptionsException
286
+ * @expectedException \ Symfony\Component\OptionsResolver\Exception\InvalidOptionsException
287
287
*/
288
288
public function testThrowExceptionIfFormatDoesNotContainYearMonthAndDay ()
289
289
{
@@ -294,7 +294,7 @@ public function testThrowExceptionIfFormatDoesNotContainYearMonthAndDay()
294
294
}
295
295
296
296
/**
297
- * @expectedException Symfony\Component\OptionsResolver\Exception\InvalidOptionsException
297
+ * @expectedException \ Symfony\Component\OptionsResolver\Exception\InvalidOptionsException
298
298
*/
299
299
public function testThrowExceptionIfFormatIsNoConstant ()
300
300
{
@@ -304,7 +304,7 @@ public function testThrowExceptionIfFormatIsNoConstant()
304
304
}
305
305
306
306
/**
307
- * @expectedException Symfony\Component\OptionsResolver\Exception\InvalidOptionsException
307
+ * @expectedException \ Symfony\Component\OptionsResolver\Exception\InvalidOptionsException
308
308
*/
309
309
public function testThrowExceptionIfFormatIsInvalid ()
310
310
{
@@ -510,7 +510,7 @@ public function testPassDatePatternToView()
510
510
$ form = $ this ->factory ->create ('date ' );
511
511
$ view = $ form ->createView ();
512
512
513
- $ this ->assertSame ('{{ day }}. {{ month }}. {{ year }} ' , $ view ->vars ['date_pattern ' ]);
513
+ $ this ->assertSame ('{{ day }}{{ month }}{{ year }} ' , $ view ->vars ['date_pattern ' ]);
514
514
}
515
515
516
516
public function testPassDatePatternToViewDifferentFormat ()
@@ -521,10 +521,21 @@ public function testPassDatePatternToViewDifferentFormat()
521
521
522
522
$ view = $ form ->createView ();
523
523
524
- $ this ->assertSame ('{{ day }}. {{ month }} {{ year }} ' , $ view ->vars ['date_pattern ' ]);
524
+ $ this ->assertSame ('{{ day }}{{ month }}{{ year }} ' , $ view ->vars ['date_pattern ' ]);
525
525
}
526
526
527
527
public function testPassDatePatternToViewDifferentPattern ()
528
+ {
529
+ $ form = $ this ->factory ->create ('date ' , null , array (
530
+ 'format ' => 'MMyyyydd '
531
+ ));
532
+
533
+ $ view = $ form ->createView ();
534
+
535
+ $ this ->assertSame ('{{ month }}{{ year }}{{ day }} ' , $ view ->vars ['date_pattern ' ]);
536
+ }
537
+
538
+ public function testPassDatePatternToViewDifferentPatternWithSeparators ()
528
539
{
529
540
$ form = $ this ->factory ->create ('date ' , null , array (
530
541
'format ' => 'MM*yyyy*dd '
0 commit comments