[wp-trac] [WordPress Trac] #34378: unit tests for the current_time() in functions.php

WordPress Trac noreply at wordpress.org
Fri Jan 17 02:50:16 UTC 2020


#34378: unit tests for the current_time() in functions.php
--------------------------------------+-----------------------------
 Reporter:  pbearne                   |       Owner:  SergeyBiryukov
     Type:  enhancement               |      Status:  reviewing
 Priority:  normal                    |   Milestone:  5.4
Component:  Date/Time                 |     Version:  4.4
 Severity:  normal                    |  Resolution:
 Keywords:  has-patch has-unit-tests  |     Focuses:
--------------------------------------+-----------------------------

Comment (by SergeyBiryukov):

 Thanks for the patch!

 Just noting that some tests for `current_time()` were previously added in
 [43594].

 [attachment:"34378.diff"] cleans up some duplicate tests and brings the
 rest in line with the existing ones, including using delta comparison to
 avoid race conditions like #38381, #38815, #45821, #48145.

 These still seem a bit redundant, as some of these cases are covered by
 the existing tests and there should be no functional difference between
 `gmt_offset` and `timezone_string` modes, per comment:9:ticket:48384.

 That said, I guess it's a good idea to have some tests for `gmt_offset`
 too. Thanks again!

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/34378#comment:8>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list