Make WordPress Core


Ignore:
Timestamp:
09/19/2022 11:51:20 PM (20 months ago)
Author:
SergeyBiryukov
Message:

Tests: Add tests with deprecated timezone strings.

This commit adds tests in select places to ensure that these date/time related functions continue to behave as expected when the timezone_string option is set to an outdated/deprecated timezone name.

The timezone string used in these tests, America/Buenos_Aires, is a timezone string which was already deprecated in PHP 5.6.20 (the current minimum PHP version), so using this timezone string, we can safely test the handling of deprecated timezone names on all supported PHP versions.

See: timezone_identifiers_list() output for PHP 5.6.20.

Follow-up to [54207], [54217], [54227], [54229].

Props jrf, costdev.
See #56468.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/formatting/date.php

    r54217 r54230  
    241241                'gmt_offset'      => 3,
    242242            ),
     243            // @ticket 56468.
     244            'deprecated timezone string and no GMT offset set' => array(
     245                'timezone_string' => 'America/Buenos_Aires',
     246                'gmt_offset'      => 0,
     247            ),
    243248        );
    244249    }
Note: See TracChangeset for help on using the changeset viewer.