Drupal\Tests\datetime\Functional\DateTimeWidgetTest fails when run at midnight

Created on 25 January 2023, almost 2 years ago
Updated 12 March 2023, almost 2 years ago

Problem/Motivation

See https://dispatcher.drupalci.org/job/drupal_patches/162786/console - the \Drupal\Tests\datetime\Functional\DateTimeWidgetTest::testDateonlyDefaultValue() will fail if the day changes during the test. This is because it is using request time during a loop incorrectly.

Steps to reproduce

Run \Drupal\Tests\datetime\Functional\DateTimeWidgetTest::testDateonlyDefaultValue at 11:59:30

Proposed resolution

Don't use $request_time = $this->container->get('datetime.time')->getRequestTime(); - it's going to be the time the test starts which is just wrong.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

πŸ› Bug report
Status

Fixed

Version

10.1 ✨

Component
DatetimeΒ  β†’

Last updated 6 days ago

Created by

πŸ‡¬πŸ‡§United Kingdom alexpott πŸ‡ͺπŸ‡ΊπŸŒ

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024