Skip to content
Snippets Groups Projects
Verified Commit 7614d551 authored by Dave Long's avatar Dave Long
Browse files

Issue #3336283 by alexpott:...

Issue #3336283 by alexpott: Drupal\Tests\datetime\Functional\DateTimeWidgetTest fails when run at midnight

(cherry picked from commit 97fd6ea2)
parent 6d74e795
No related branches found
No related tags found
5 merge requests!8506Draft: Issue #3456536 by ibrahim tameme,!5646Issue #3350972 by nod_: [random test failure]...,!5600Issue #3350972 by nod_: [random test failure]...,!5343Issue #3305066 by quietone, Rename RedirectLeadingSlashesSubscriber,!3603#ISSUE 3346218 Add a different message on edit comment
......@@ -81,9 +81,11 @@ public function testDateonlyDefaultValue() {
$this->setSiteTimezone($timezone);
$this->assertEquals($timezone, $this->config('system.date')->get('timezone.default'), 'Time zone set to ' . $timezone);
// The time of the request is determined very early on in the request so
// use the current time prior to making a request.
$request_time = $this->container->get('datetime.time')->getCurrentTime();
$this->drupalGet('node/add/dateonly_content');
$request_time = $this->container->get('datetime.time')->getRequestTime();
$today = $this->dateFormatter->format($request_time, 'html_date', NULL, $timezone);
$this->assertSession()->fieldValueEquals('field_dateonly[0][value][date]', $today);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment