8000 [Form] Fix Date\TimeType marked as invalid on request with single_text and zero seconds by LuisDeimos · Pull Request #20307 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[Form] Fix Date\TimeType marked as invalid on request with single_text and zero seconds #20307

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 6 commits into from
Prev Previous commit
[Form] fixed Date\TimeType marked as invalid on request with single_t…
…ext and zero seconds (LuisDeimos)
  • Loading branch information
LuisDeimos committed Oct 27, 2016
commit ea9567e032c17a8b01548bd74ca54b8d0079bcc1
Original file line number Diff line number Diff line change
Expand Up @@ -167,34 +167,6 @@ public function testSubmitWithSeconds()
$this->assertDateTimeEquals(new \DateTime('2010-06-02 03:04:05 UTC'), $form->getData());
}

public function testSubmitWithSecondsAndBrowserOmissionSeconds()
{
$form = $this->factory->create('datetime', null, array(
'model_timezone' => 'UTC',
'view_timezone' => 'UTC',
'date_widget' => 'choice',
'years' => array(2010),
'time_widget' => 'single_text',
'input' => 'datetime',
'with_seconds' => true,
));

$form->setData(new \DateTime());

$input = array(
'date' => array(
'day' => '2',
'month' => '6',
'year' => '2010',
),
'time' => '03:04',
);

$form->submit($input);

$this->assertDateTimeEquals(new \DateTime('2010-06-02 03:04:00 UTC'), $form->getData());
}

public function testSubmitDifferentTimezones()
{
$form = $this->factory->create('datetime', null, array(
Expand Down
0