Wordpress/tests/phpunit/includes
Andrew Ozz c7936b8785 Improve the performance of `wp_upload_dir()`:
- Cache the output in non-persistent cache.
- Cache the result from `wp_mkdir_p()` in persistent cache (when present).
- Introduce `wp_get_upload_dir()` for use when not uploading files. It is equivalent to `wp_upload_dir()` but does not check for the existence or create the upload directory.
- Change tests to use the non-cached `_wp_upload_dir()`. They change options on the fly (should never be used in production) to simulate different environments.
- Introduce `_upload_dir_no_subdir()` and `_upload_dir_https()` to facilitate testing. These use the proper `upload_dir` filter to simulate different environments.

Props kovshenin, azaozz.
See #34359.

git-svn-id: https://develop.svn.wordpress.org/trunk@36565 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-17 22:51:01 +00:00
..
factory Build/Test Tools: Move class `WP_UnitTest_Factory` into its own file. 2016-01-27 03:26:15 +00:00
bootstrap.php Tests: Add test for `wp_get_installed_translations()`. 2016-02-17 22:01:11 +00:00
exceptions.php
factory.php Build/Test Tools: Move class `WP_UnitTest_Factory` into its own file. 2016-01-27 03:26:15 +00:00
functions.php Improve the performance of `wp_upload_dir()`: 2016-02-17 22:51:01 +00:00
install.php Tests: Use the `default_storage_engine` MySQL option on newer MySQL versions. 2015-12-21 22:26:52 +00:00
mock-fs.php
mock-image-editor.php
mock-mailer.php
speed-trap-listener.php Unit Tests: Implement `addWarning()` method in SpeedTrapListener. 2015-12-04 16:40:10 +00:00
spy-rest-server.php REST API: Core typically sends nocache headers on all auth'ed responses, as in `wp`, `admin-ajax`, etc. Because the REST API infrastructure is hooked in pre-wp, we should be setting this ourselves. 2015-12-04 23:35:54 +00:00
testcase-ajax.php AJAX UNIT TESTS: Have you ever wondered why these take 600 forevers to run? They all eventually call `do_action( 'admin_init' )`, which has `_maybe_update_core`, `_maybe_update_plugins`, and `_maybe_update_themes` hooked to it. REMOVE THEM, and AJAX unit tests run like the wind. `Tests_Ajax_Response` is still slow. 2015-10-21 03:17:36 +00:00
testcase-canonical.php Tests: Remove some debug that's slipped in at some point. 2016-01-09 06:11:58 +00:00
testcase-rest-api.php
testcase-xmlrpc.php XMLRPC: Revert the changes to `WP_XMLRPC_UnitTestCase` in [35366] as they weren't required. 2015-10-23 04:49:08 +00:00
testcase.php Comments: Commit tests missed in [35848]. 2015-12-10 03:15:44 +00:00
trac.php
utils.php Introduce `publicly_queryable` taxonomy argument. 2016-02-13 03:50:37 +00:00
wp-profiler.php