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',
|
'model_timezone' => 'UTC',
|
||||||
'view_timezone' => 'UTC',
|
'view_timezone' => 'UTC',
|
||||||
'date_widget' => 'choice',
|
'date_widget' => 'choice',
|
||||||
|
'years' => array(2010),
|
||||||
'time_widget' => 'choice',
|
'time_widget' => 'choice',
|
||||||
'input' => 'datetime',
|
'input' => 'datetime',
|
||||||
));
|
));
|
||||||
@ -57,6 +58,7 @@ class DateTimeTypeTest extends TestCase
|
|||||||
'view_timezone' => 'UTC',
|
'view_timezone' => 'UTC',
|
||||||
'input' => 'string',
|
'input' => 'string',
|
||||||
'date_widget' => 'choice',
|
'date_widget' => 'choice',
|
||||||
|
'years' => array(2010),
|
||||||
'time_widget' => 'choice',
|
'time_widget' => 'choice',
|
||||||
));
|
));
|
||||||
|
|
||||||
@ -82,6 +84,7 @@ class DateTimeTypeTest extends TestCase
|
|||||||
'view_timezone' => 'UTC',
|
'view_timezone' => 'UTC',
|
||||||
'input' => 'timestamp',
|
'input' => 'timestamp',
|
||||||
'date_widget' => 'choice',
|
'date_widget' => 'choice',
|
||||||
|
'years' => array(2010),
|
||||||
'time_widget' => 'choice',
|
'time_widget' => 'choice',
|
||||||
));
|
));
|
||||||
|
|
||||||
@ -108,12 +111,13 @@ class DateTimeTypeTest extends TestCase
|
|||||||
'model_timezone' => 'UTC',
|
'model_timezone' => 'UTC',
|
||||||
'view_timezone' => 'UTC',
|
'view_timezone' => 'UTC',
|
||||||
'date_widget' => 'choice',
|
'date_widget' => 'choice',
|
||||||
|
'years' => array(2010),
|
||||||
'time_widget' => 'choice',
|
'time_widget' => 'choice',
|
||||||
'input' => 'datetime',
|
'input' => 'datetime',
|
||||||
'with_minutes' => false,
|
'with_minutes' => false,
|
||||||
));
|
));
|
||||||
|
|
||||||
$form->setData(new \DateTime('2010-06-02 03:04:05 UTC'));
|
$form->setData(new \DateTime());
|
||||||
|
|
||||||
$input = array(
|
$input = array(
|
||||||
'date' => array(
|
'date' => array(
|
||||||
@ -137,12 +141,13 @@ class DateTimeTypeTest extends TestCase
|
|||||||
'model_timezone' => 'UTC',
|
'model_timezone' => 'UTC',
|
||||||
'view_timezone' => 'UTC',
|
'view_timezone' => 'UTC',
|
||||||
'date_widget' => 'choice',
|
'date_widget' => 'choice',
|
||||||
|
'years' => array(2010),
|
||||||
'time_widget' => 'choice',
|
'time_widget' => 'choice',
|
||||||
'input' => 'datetime',
|
'input' => 'datetime',
|
||||||
'with_seconds' => true,
|
'with_seconds' => true,
|
||||||
));
|
));
|
||||||
|
|
||||||
$form->setData(new \DateTime('2010-06-02 03:04:05 UTC'));
|
$form->setData(new \DateTime());
|
||||||
|
|
||||||
$input = array(
|
$input = array(
|
||||||
'date' => array(
|
'date' => array(
|
||||||
@ -168,6 +173,7 @@ class DateTimeTypeTest extends TestCase
|
|||||||
'model_timezone' => 'America/New_York',
|
'model_timezone' => 'America/New_York',
|
||||||
'view_timezone' => 'Pacific/Tahiti',
|
'view_timezone' => 'Pacific/Tahiti',
|
||||||
'date_widget' => 'choice',
|
'date_widget' => 'choice',
|
||||||
|
'years' => array(2010),
|
||||||
'time_widget' => 'choice',
|
'time_widget' => 'choice',
|
||||||
'input' => 'string',
|
'input' => 'string',
|
||||||
'with_seconds' => true,
|
'with_seconds' => true,
|
||||||
|
@ -180,6 +180,7 @@ class DateTypeTest extends TestCase
|
|||||||
'model_timezone' => 'UTC',
|
'model_timezone' => 'UTC',
|
||||||
'view_timezone' => 'UTC',
|
'view_timezone' => 'UTC',
|
||||||
'widget' => 'choice',
|
'widget' => 'choice',
|
||||||
|
'years' => array(2010),
|
||||||
));
|
));
|
||||||
|
|
||||||
$text = array(
|
$text = array(
|
||||||
|
Reference in New Issue
Block a user