[wp-trac] [WordPress Trac] #34277: factory not setup correctly in unit test in test_validate_date_values_should_process_array_value_for_year
WordPress Trac
noreply at wordpress.org
Mon Oct 12 23:17:00 UTC 2015
#34277: factory not setup correctly in unit test in
test_validate_date_values_should_process_array_value_for_year
------------------------------+-----------------------------
Reporter: pbearne | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Build/Test Tools | Version: trunk
Severity: normal | Keywords:
Focuses: |
------------------------------+-----------------------------
In the unit test
"test_validate_date_values_should_process_array_value_for_year"two posts
are made inorder to do a query on them for the test but the post_date a
set wrongly as "get_gmt_from_date()" needs the date passed to be in the
format of 'Y-m-d H:i:s' inorder to mnatch the internal regex if the
get_option( 'timezone_string' ); returns false
There are 2 ways to fix this pass the full date (as patched) or to set
update_option( 'timezone_string', 'Europe/London' ); before calling the
factory or change get_gmt_from_date() to work with incomplete dates
--
Ticket URL: <https://core.trac.wordpress.org/ticket/34277>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list