Skip to content

Commit 33de917

Browse files
Merge branch '2.7' into 2.8
* 2.7: do not depend on a fixed date in layout tests [Console] Escape default value when dumping help [Console] OS X Can't call cli_set_process_title php without superuser Polish translation improvement in Validator component [Console] Descriptors should use Helper::strlen [Config] Improve PHPdoc / IDE autocomplete [Debug] Wrap call to ->log in a try catch block [Debug] UndefinedMethodFatalErrorHandler - Handle anonymous classes [SecurityBundle] Made collection of user provider unique when injecting them to the RemberMeService
2 parents fd24563 + 3d64ddb commit 33de917

File tree

2 files changed

+16
-16
lines changed

2 files changed

+16
-16
lines changed

Tests/AbstractBootstrap3LayoutTest.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1408,7 +1408,7 @@ public function testCountryWithPlaceholder()
14081408

14091409
public function testDateTime()
14101410
{
1411-
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\DateTimeType', '2011-02-03 04:05:06', array(
1411+
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\DateTimeType', date('Y').'-02-03 04:05:06', array(
14121412
'input' => 'string',
14131413
'with_seconds' => false,
14141414
));
@@ -1427,7 +1427,7 @@ public function testDateTime()
14271427
/following-sibling::select
14281428
[@id="name_date_year"]
14291429
[@class="form-control"]
1430-
[./option[@value="2011"][@selected="selected"]]
1430+
[./option[@value="'.date('Y').'"][@selected="selected"]]
14311431
/following-sibling::select
14321432
[@id="name_time_hour"]
14331433
[@class="form-control"]
@@ -1482,7 +1482,7 @@ public function testDateTimeWithPlaceholderGlobal()
14821482

14831483
public function testDateTimeWithHourAndMinute()
14841484
{
1485-
$data = array('year' => '2011', 'month' => '2', 'day' => '3', 'hour' => '4', 'minute' => '5');
1485+
$data = array('year' => date('Y'), 'month' => '2', 'day' => '3', 'hour' => '4', 'minute' => '5');
14861486

14871487
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\DateTimeType', $data, array(
14881488
'input' => 'array',
@@ -1504,7 +1504,7 @@ public function testDateTimeWithHourAndMinute()
15041504
/following-sibling::select
15051505
[@id="name_date_year"]
15061506
[@class="form-control"]
1507-
[./option[@value="2011"][@selected="selected"]]
1507+
[./option[@value="'.date('Y').'"][@selected="selected"]]
15081508
/following-sibling::select
15091509
[@id="name_time_hour"]
15101510
[@class="form-control"]
@@ -1521,7 +1521,7 @@ public function testDateTimeWithHourAndMinute()
15211521

15221522
public function testDateTimeWithSeconds()
15231523
{
1524-
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\DateTimeType', '2011-02-03 04:05:06', array(
1524+
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\DateTimeType', date('Y').'-02-03 04:05:06', array(
15251525
'input' => 'string',
15261526
'with_seconds' => true,
15271527
));
@@ -1541,7 +1541,7 @@ public function testDateTimeWithSeconds()
15411541
/following-sibling::select
15421542
[@id="name_date_year"]
15431543
[@class="form-control"]
1544-
[./option[@value="2011"][@selected="selected"]]
1544+
[./option[@value="'.date('Y').'"][@selected="selected"]]
15451545
/following-sibling::select
15461546
[@id="name_time_hour"]
15471547
[@class="form-control"]
@@ -1631,7 +1631,7 @@ public function testDateTimeWithWidgetSingleTextIgnoreDateAndTimeWidgets()
16311631

16321632
public function testDateChoice()
16331633
{
1634-
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\DateType', '2011-02-03', array(
1634+
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\DateType', date('Y').'-02-03', array(
16351635
'input' => 'string',
16361636
'widget' => 'choice',
16371637
));
@@ -1651,7 +1651,7 @@ public function testDateChoice()
16511651
/following-sibling::select
16521652
[@id="name_year"]
16531653
[@class="form-control"]
1654-
[./option[@value="2011"][@selected="selected"]]
1654+
[./option[@value="'.date('Y').'"][@selected="selected"]]
16551655
]
16561656
[count(./select)=3]
16571657
'

Tests/AbstractLayoutTest.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1300,7 +1300,7 @@ public function testCountryWithPlaceholder()
13001300

13011301
public function testDateTime()
13021302
{
1303-
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\DateTimeType', '2011-02-03 04:05:06', array(
1303+
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\DateTimeType', date('Y').'-02-03 04:05:06', array(
13041304
'input' => 'string',
13051305
'with_seconds' => false,
13061306
));
@@ -1319,7 +1319,7 @@ public function testDateTime()
13191319
[./option[@value="3"][@selected="selected"]]
13201320
/following-sibling::select
13211321
[@id="name_date_year"]
1322-
[./option[@value="2011"][@selected="selected"]]
1322+
[./option[@value="'.date('Y').'"][@selected="selected"]]
13231323
]
13241324
/following-sibling::div
13251325
[@id="name_time"]
@@ -1379,7 +1379,7 @@ public function testDateTimeWithPlaceholderGlobal()
13791379

13801380
public function testDateTimeWithHourAndMinute()
13811381
{
1382-
$data = array('year' => '2011', 'month' => '2', 'day' => '3', 'hour' => '4', 'minute' => '5');
1382+
$data = array('year' => date('Y'), 'month' => '2', 'day' => '3', 'hour' => '4', 'minute' => '5');
13831383

13841384
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\DateTimeType', $data, array(
13851385
'input' => 'array',
@@ -1400,7 +1400,7 @@ public function testDateTimeWithHourAndMinute()
14001400
[./option[@value="3"][@selected="selected"]]
14011401
/following-sibling::select
14021402
[@id="name_date_year"]
1403-
[./option[@value="2011"][@selected="selected"]]
1403+
[./option[@value="'.date('Y').'"][@selected="selected"]]
14041404
]
14051405
/following-sibling::div
14061406
[@id="name_time"]
@@ -1420,7 +1420,7 @@ public function testDateTimeWithHourAndMinute()
14201420

14211421
public function testDateTimeWithSeconds()
14221422
{
1423-
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\DateTimeType', '2011-02-03 04:05:06', array(
1423+
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\DateTimeType', date('Y').'-02-03 04:05:06', array(
14241424
'input' => 'string',
14251425
'with_seconds' => true,
14261426
));
@@ -1439,7 +1439,7 @@ public function testDateTimeWithSeconds()
14391439
[./option[@value="3"][@selected="selected"]]
14401440
/following-sibling::select
14411441
[@id="name_date_year"]
1442-
[./option[@value="2011"][@selected="selected"]]
1442+
[./option[@value="'.date('Y').'"][@selected="selected"]]
14431443
]
14441444
/following-sibling::div
14451445
[@id="name_time"]
@@ -1526,7 +1526,7 @@ public function testDateTimeWithWidgetSingleTextIgnoreDateAndTimeWidgets()
15261526

15271527
public function testDateChoice()
15281528
{
1529-
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\DateType', '2011-02-03', array(
1529+
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\DateType', date('Y').'-02-03', array(
15301530
'input' => 'string',
15311531
'widget' => 'choice',
15321532
));
@@ -1542,7 +1542,7 @@ public function testDateChoice()
15421542
[./option[@value="3"][@selected="selected"]]
15431543
/following-sibling::select
15441544
[@id="name_year"]
1545-
[./option[@value="2011"][@selected="selected"]]
1545+
[./option[@value="'.date('Y').'"][@selected="selected"]]
15461546
]
15471547
[count(./select)=3]
15481548
'

0 commit comments

Comments
 (0)