Skip to content

Commit d85d931

Browse files
Merge branch '2.8' into 3.1
* 2.8: 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 Fixed @return when returning this or static #bis 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 523c788 + 33de917 commit d85d931

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
@@ -1364,7 +1364,7 @@ public function testCountryWithPlaceholder()
13641364

13651365
public function testDateTime()
13661366
{
1367-
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\DateTimeType', '2011-02-03 04:05:06', array(
1367+
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\DateTimeType', date('Y').'-02-03 04:05:06', array(
13681368
'input' => 'string',
13691369
'with_seconds' => false,
13701370
));
@@ -1383,7 +1383,7 @@ public function testDateTime()
13831383
/following-sibling::select
13841384
[@id="name_date_year"]
13851385
[@class="form-control"]
1386-
[./option[@value="2011"][@selected="selected"]]
1386+
[./option[@value="'.date('Y').'"][@selected="selected"]]
13871387
/following-sibling::select
13881388
[@id="name_time_hour"]
13891389
[@class="form-control"]
@@ -1438,7 +1438,7 @@ public function testDateTimeWithPlaceholderGlobal()
14381438

14391439
public function testDateTimeWithHourAndMinute()
14401440
{
1441-
$data = array('year' => '2011', 'month' => '2', 'day' => '3', 'hour' => '4', 'minute' => '5');
1441+
$data = array('year' => date('Y'), 'month' => '2', 'day' => '3', 'hour' => '4', 'minute' => '5');
14421442

14431443
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\DateTimeType', $data, array(
14441444
'input' => 'array',
@@ -1460,7 +1460,7 @@ public function testDateTimeWithHourAndMinute()
14601460
/following-sibling::select
14611461
[@id="name_date_year"]
14621462
[@class="form-control"]
1463-
[./option[@value="2011"][@selected="selected"]]
1463+
[./option[@value="'.date('Y').'"][@selected="selected"]]
14641464
/following-sibling::select
14651465
[@id="name_time_hour"]
14661466
[@class="form-control"]
@@ -1477,7 +1477,7 @@ public function testDateTimeWithHourAndMinute()
14771477

14781478
public function testDateTimeWithSeconds()
14791479
{
1480-
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\DateTimeType', '2011-02-03 04:05:06', array(
1480+
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\DateTimeType', date('Y').'-02-03 04:05:06', array(
14811481
'input' => 'string',
14821482
'with_seconds' => true,
14831483
));
@@ -1497,7 +1497,7 @@ public function testDateTimeWithSeconds()
14971497
/following-sibling::select
14981498
[@id="name_date_year"]
14991499
[@class="form-control"]
1500-
[./option[@value="2011"][@selected="selected"]]
1500+
[./option[@value="'.date('Y').'"][@selected="selected"]]
15011501
/following-sibling::select
15021502
[@id="name_time_hour"]
15031503
[@class="form-control"]
@@ -1587,7 +1587,7 @@ public function testDateTimeWithWidgetSingleTextIgnoreDateAndTimeWidgets()
15871587

15881588
public function testDateChoice()
15891589
{
1590-
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\DateType', '2011-02-03', array(
1590+
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\DateType', date('Y').'-02-03', array(
15911591
'input' => 'string',
15921592
'widget' => 'choice',
15931593
));
@@ -1607,7 +1607,7 @@ public function testDateChoice()
16071607
/following-sibling::select
16081608
[@id="name_year"]
16091609
[@class="form-control"]
1610-
[./option[@value="2011"][@selected="selected"]]
1610+
[./option[@value="'.date('Y').'"][@selected="selected"]]
16111611
]
16121612
[count(./select)=3]
16131613
'

Tests/AbstractLayoutTest.php

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

12341234
public function testDateTime()
12351235
{
1236-
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\DateTimeType', '2011-02-03 04:05:06', array(
1236+
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\DateTimeType', date('Y').'-02-03 04:05:06', array(
12371237
'input' => 'string',
12381238
'with_seconds' => false,
12391239
));
@@ -1252,7 +1252,7 @@ public function testDateTime()
12521252
[./option[@value="3"][@selected="selected"]]
12531253
/following-sibling::select
12541254
[@id="name_date_year"]
1255-
[./option[@value="2011"][@selected="selected"]]
1255+
[./option[@value="'.date('Y').'"][@selected="selected"]]
12561256
]
12571257
/following-sibling::div
12581258
[@id="name_time"]
@@ -1312,7 +1312,7 @@ public function testDateTimeWithPlaceholderGlobal()
13121312

13131313
public function testDateTimeWithHourAndMinute()
13141314
{
1315-
$data = array('year' => '2011', 'month' => '2', 'day' => '3', 'hour' => '4', 'minute' => '5');
1315+
$data = array('year' => date('Y'), 'month' => '2', 'day' => '3', 'hour' => '4', 'minute' => '5');
13161316

13171317
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\DateTimeType', $data, array(
13181318
'input' => 'array',
@@ -1333,7 +1333,7 @@ public function testDateTimeWithHourAndMinute()
13331333
[./option[@value="3"][@selected="selected"]]
13341334
/following-sibling::select
13351335
[@id="name_date_year"]
1336-
[./option[@value="2011"][@selected="selected"]]
1336+
[./option[@value="'.date('Y').'"][@selected="selected"]]
13371337
]
13381338
/following-sibling::div
13391339
[@id="name_time"]
@@ -1353,7 +1353,7 @@ public function testDateTimeWithHourAndMinute()
13531353

13541354
public function testDateTimeWithSeconds()
13551355
{
1356-
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\DateTimeType', '2011-02-03 04:05:06', array(
1356+
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\DateTimeType', date('Y').'-02-03 04:05:06', array(
13571357
'input' => 'string',
13581358
'with_seconds' => true,
13591359
));
@@ -1372,7 +1372,7 @@ public function testDateTimeWithSeconds()
13721372
[./option[@value="3"][@selected="selected"]]
13731373
/following-sibling::select
13741374
[@id="name_date_year"]
1375-
[./option[@value="2011"][@selected="selected"]]
1375+
[./option[@value="'.date('Y').'"][@selected="selected"]]
13761376
]
13771377
/following-sibling::div
13781378
[@id="name_time"]
@@ -1459,7 +1459,7 @@ public function testDateTimeWithWidgetSingleTextIgnoreDateAndTimeWidgets()
14591459

14601460
public function testDateChoice()
14611461
{
1462-
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\DateType', '2011-02-03', array(
1462+
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\DateType', date('Y').'-02-03', array(
14631463
'input' => 'string',
14641464
'widget' => 'choice',
14651465
));
@@ -1475,7 +1475,7 @@ public function testDateChoice()
14751475
[./option[@value="3"][@selected="selected"]]
14761476
/following-sibling::select
14771477
[@id="name_year"]
1478-
[./option[@value="2011"][@selected="selected"]]
1478+
[./option[@value="'.date('Y').'"][@selected="selected"]]
14791479
]
14801480
[count(./select)=3]
14811481
'

0 commit comments

Comments
 (0)