Wordpress/tests/phpunit/includes
Sergey Biryukov 9afe01b087 REST API: Shim `post_date_gmt` for drafts / empty dates in the REST API.
Internally, WordPress uses a special `post_date_gmt` value of `0000-00-00 00:00:00` to indicate that a draft's date is "floating" and should be updated whenever the post is saved. This makes it much more difficult for API clients to know the correct date of a draft post.

This commit provides a best guess at a `date_gmt` value for draft posts in this situation using the `date` field and the site's current timezone offset.

Props joehoyle, jnylen0.
Merges [40108] to the 4.7 branch.
Fixes #38883.

git-svn-id: https://develop.svn.wordpress.org/branches/4.7@40115 602fd350-edb4-49c9-b593-d223f7449a82
2017-02-24 22:02:48 +00:00
..
factory Multisite: Use `get_network()` in `WP_UnitTest_Factory_For_Network`. 2016-11-01 16:51:26 +00:00
bootstrap.php Mail: Set a better error code when triggering `wp_mail_failed`. 2016-11-02 04:26:18 +00:00
class-basic-object.php Tests: Add docblocks for `Basic_Object` and `Basic_Subclass` classes. 2016-08-30 14:31:56 +00:00
class-basic-subclass.php Tests: Add docblocks for `Basic_Object` and `Basic_Subclass` classes. 2016-08-30 14:31:56 +00:00
exceptions.php
factory.php
functions.php REST API: Improve validation for usernames and passwords. 2016-11-14 07:12:31 +00:00
install.php Tests: Fix a PHP notice introduced in [38907]. 2016-10-25 11:05:17 +00:00
mock-fs.php
mock-image-editor.php
mock-mailer.php
speed-trap-listener.php
spy-rest-server.php REST API: Allow unsetting of page templates in update requests. 2016-11-23 02:46:42 +00:00
testcase-ajax.php Plugins: Move capability checks further up in `wp_ajax_update_plugin()` and `wp_ajax_delete_plugin()`. 2016-07-27 17:42:01 +00:00
testcase-canonical.php Built/Test Tools: Unify the way the permastructure is set when used in conjunction with re-registering the initial taxonomies. This ensure that rewrite rules for taxonomies are consistently available. 2016-09-26 17:01:48 +00:00
testcase-rest-api.php
testcase-rest-controller.php REST API: Fire correct hooks when creating users on multiste. 2016-11-09 01:34:56 +00:00
testcase-rest-post-type-controller.php REST API: Shim `post_date_gmt` for drafts / empty dates in the REST API. 2017-02-24 22:02:48 +00:00
testcase-xmlrpc.php Bootstrap: do not go gentle into that good night r38411, r38412, and parts of r38389. 2016-08-31 16:30:48 +00:00
testcase.php Tests: Restore the database connection earlier when switching test groups. 2016-12-21 05:07:05 +00:00
trac.php
utils.php Tests: Restore the database connection earlier when switching test groups. 2016-12-21 05:07:05 +00:00
wp-profiler.php