Fix Form's DateTimeType tests.
This commit is contained in:
parent
e738227d63
commit
be20e892c2
|
@ -29,6 +29,7 @@ class DateTimeTypeTest extends TestCase
|
|||
'model_timezone' => 'UTC',
|
||||
'view_timezone' => 'UTC',
|
||||
'date_widget' => 'choice',
|
||||
'years' => array(2010),
|
||||
'time_widget' => 'choice',
|
||||
'input' => 'datetime',
|
||||
));
|
||||
|
@ -57,6 +58,7 @@ class DateTimeTypeTest extends TestCase
|
|||
'view_timezone' => 'UTC',
|
||||
'input' => 'string',
|
||||
'date_widget' => 'choice',
|
||||
'years' => array(2010),
|
||||
'time_widget' => 'choice',
|
||||
));
|
||||
|
||||
|
@ -82,6 +84,7 @@ class DateTimeTypeTest extends TestCase
|
|||
'view_timezone' => 'UTC',
|
||||
'input' => 'timestamp',
|
||||
'date_widget' => 'choice',
|
||||
'years' => array(2010),
|
||||
'time_widget' => 'choice',
|
||||
));
|
||||
|
||||
|
@ -108,12 +111,13 @@ class DateTimeTypeTest extends TestCase
|
|||
'model_timezone' => 'UTC',
|
||||
'view_timezone' => 'UTC',
|
||||
'date_widget' => 'choice',
|
||||
'years' => array(2010),
|
||||
'time_widget' => 'choice',
|
||||
'input' => 'datetime',
|
||||
'with_minutes' => false,
|
||||
));
|
||||
|
||||
$form->setData(new \DateTime('2010-06-02 03:04:05 UTC'));
|
||||
$form->setData(new \DateTime());
|
||||
|
||||
$input = array(
|
||||
'date' => array(
|
||||
|
@ -137,12 +141,13 @@ class DateTimeTypeTest extends TestCase
|
|||
'model_timezone' => 'UTC',
|
||||
'view_timezone' => 'UTC',
|
||||
'date_widget' => 'choice',
|
||||
'years' => array(2010),
|
||||
'time_widget' => 'choice',
|
||||
'input' => 'datetime',
|
||||
'with_seconds' => true,
|
||||
));
|
||||
|
||||
$form->setData(new \DateTime('2010-06-02 03:04:05 UTC'));
|
||||
$form->setData(new \DateTime());
|
||||
|
||||
$input = array(
|
||||
'date' => array(
|
||||
|
@ -168,6 +173,7 @@ class DateTimeTypeTest extends TestCase
|
|||
'model_timezone' => 'America/New_York',
|
||||
'view_timezone' => 'Pacific/Tahiti',
|
||||
'date_widget' => 'choice',
|
||||
'years' => array(2010),
|
||||
'time_widget' => 'choice',
|
||||
'input' => 'string',
|
||||
'with_seconds' => true,
|
||||
|
|
|
@ -180,6 +180,7 @@ class DateTypeTest extends TestCase
|
|||
'model_timezone' => 'UTC',
|
||||
'view_timezone' => 'UTC',
|
||||
'widget' => 'choice',
|
||||
'years' => array(2010),
|
||||
));
|
||||
|
||||
$text = array(
|
||||
|
|
Reference in New Issue