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
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -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);