wordpress-develop/tests/phpunit/tests
Felix Arntz e78d988aa2 Security, Site Health: Detect HTTPS support and encourage switching.
This changeset modifies the Site Health panel for HTTPS to provide more accurate recommendations based on whether the environment is already set up for HTTPS.

* Introduces `wp_is_using_https()` to check whether the site is configured to use HTTPS (via its Site Address and WordPress Address).
* Introduces `wp_is_https_supported()` to check whether the environment supports HTTPS. This relies on a cron job which periodically checks support using a loopback request.

Props Clorith, flixos90, miinasikk, westonruter.
Fixes #47577.


git-svn-id: https://develop.svn.wordpress.org/trunk@49904 602fd350-edb4-49c9-b593-d223f7449a82
2020-12-23 19:11:20 +00:00
..
actions Tests: First pass at using assertSame() instead of assertEquals() in most of the unit tests. 2020-09-02 00:35:36 +00:00
admin Tests: Ignore EOL differences in WP_List_Table::get_bulk_items() test for optgroups. 2020-11-24 20:41:13 +00:00
ajax Build/Test Tools: Run the Ajax test group for multisite. 2020-12-18 14:38:28 +00:00
attachment Build/Test Tools: Standardise the name, signature, and usage of the wpSetUpBeforeClass() method that's used in test classes. 2020-11-15 13:59:32 +00:00
blocks Blocks: Align with Gutenberg the name of generated asset handle for core blocks 2020-12-21 11:37:30 +00:00
bookmark Tests: Introduce assertSameSets() and assertSameSetsWithIndex(), and use them where appropriate. 2020-09-04 07:01:00 +00:00
canonical Permalinks: Prevent attachment pages 404ing following [49563]. 2020-11-17 03:27:07 +00:00
category Menus: In Walker_Nav_Menu, Walker_Category, and Walker_Page, properly output link attributes having a legitimate "empty" value, for example an HTML data attribute with a value of zero (0). 2019-10-06 15:04:18 +00:00
comment Tests: Use shared post fixture in comment template tests. 2020-12-22 07:42:23 +00:00
customize Customize: Ensure multiple CSS classes are passed to nav_menu_link_attributes as an array 2020-11-17 04:29:02 +00:00
date Build/Test Tools: Misc test enhancements. 2020-11-15 17:17:55 +00:00
db Tests: Use consistent trailing punctuation in markTestSkipped() messages. 2020-09-21 14:05:23 +00:00
dependencies Build/Test Tools: Improve the reliability of the test that ensures correct dependency order when inline scripts are used. 2020-11-14 17:20:57 +00:00
editor Tests: Introduce assertSameSets() and assertSameSetsWithIndex(), and use them where appropriate. 2020-09-04 07:01:00 +00:00
error-protection Tests: First pass at using assertSame() instead of assertEquals() in most of the unit tests. 2020-09-02 00:35:36 +00:00
external-http Docs: Improve inline comments per the documentation standards. 2020-01-29 00:43:23 +00:00
feed Feed: Merge multiple header values to avoid fatal error. 2020-12-16 00:49:32 +00:00
filesystem Tests: First pass at using assertSame() instead of assertEquals() in most of the unit tests. 2020-09-02 00:35:36 +00:00
formatting Docs, Tests: Correctly capitalize JavaScript. 2020-12-06 02:19:56 +00:00
functions Build/Test Tools: Standardise the name, signature, and usage of the wpSetUpBeforeClass() method that's used in test classes. 2020-11-15 13:59:32 +00:00
general Query: Correct some coding standards after [49843]. 2020-12-21 02:54:43 +00:00
hooks Tests: Introduce assertSameSets() and assertSameSetsWithIndex(), and use them where appropriate. 2020-09-04 07:01:00 +00:00
http Code Modernization: Use explicit visibility for class property declarations. 2020-10-17 16:24:35 +00:00
image Tests: Correct @ticket references in some test files. 2020-12-05 15:49:25 +00:00
import Tests: Use consistent trailing punctuation in fail() messages. 2020-09-22 12:32:39 +00:00
includes Tests: Consistently use the expectException() method instead of the older @expectedException annotation. 2020-09-18 13:22:22 +00:00
l10n I18N: Avoid PHP notices for relative URLs in load_script_textdomain(). 2020-11-17 20:50:21 +00:00
link Build/Test Tools: Standardise the name, signature, and usage of the wpSetUpBeforeClass() method that's used in test classes. 2020-11-15 13:59:32 +00:00
load Bootstrap: Enhance core's memory limit handling. 2016-07-08 14:36:37 +00:00
media Coding Standards: Upgrade WPCS to 1.0.0 2018-08-17 01:50:26 +00:00
menu General: Remove noreferrer from wp_targeted_link_rel() and other uses. 2020-10-19 23:37:53 +00:00
meta Build/Test Tools: Standardise the name, signature, and usage of the wpSetUpBeforeClass() method that's used in test classes. 2020-11-15 13:59:32 +00:00
multisite Multisite: Cache absolute dirsize paths to avoid PHP 8 fatal. 2020-12-03 20:37:43 +00:00
oembed Build/Test Tools: Standardise the name, signature, and usage of the wpSetUpBeforeClass() method that's used in test classes. 2020-11-15 13:59:32 +00:00
option General: Replace older-style PHP type conversion functions with type casts. 2020-10-08 21:13:57 +00:00
pomo Tests: Simplify PluralFormsTest::test_exceptions(). 2020-09-18 14:11:11 +00:00
post REST API: Pass the previous state of the post as a parameter to the wp_after_insert_post hook. 2020-12-01 20:45:43 +00:00
privacy Build/Test Tools: Standardise the name, signature, and usage of the wpSetUpBeforeClass() method that's used in test classes. 2020-11-15 13:59:32 +00:00
query Tests: Correct @ticket references in tests/query/invalidQueries.php. 2020-12-23 15:04:54 +00:00
rest-api App Passwords: Prevent conflicts when Basic Auth is already used by the site. 2020-12-04 21:42:52 +00:00
rewrite Build/Test Tools: Standardise the name, signature, and usage of the wpSetUpBeforeClass() method that's used in test classes. 2020-11-15 13:59:32 +00:00
sitemaps Build/Test Tools: Standardise the name, signature, and usage of the wpSetUpBeforeClass() method that's used in test classes. 2020-11-15 13:59:32 +00:00
taxonomy Tests: Add missing parent::setUp() calls to all test classes. 2019-01-14 04:54:01 +00:00
term Build/Test Tools: Standardise the name, signature, and usage of the wpSetUpBeforeClass() method that's used in test classes. 2020-11-15 13:59:32 +00:00
theme Build/Test Tools: Standardise the name, signature, and usage of the wpSetUpBeforeClass() method that's used in test classes. 2020-11-15 13:59:32 +00:00
url Build/Test Tools: Standardise the name, signature, and usage of the wpSetUpBeforeClass() method that's used in test classes. 2020-11-15 13:59:32 +00:00
user Built/Test Tools: Switch to a data provider for the default user role and capability tests. 2020-11-15 14:57:39 +00:00
widgets General: Remove noreferrer from wp_targeted_link_rel() and other uses. 2020-10-19 23:37:53 +00:00
xmlrpc XML-RPC: Emit an appropriate HTTP status code when an error is returned in response to an XML-RPC request. 2020-12-21 20:21:12 +00:00
actions.php Tests: First pass at using assertSame() instead of assertEquals() in most of the unit tests. 2020-09-02 00:35:36 +00:00
adminbar.php Build/Test Tools: Standardise the name, signature, and usage of the wpSetUpBeforeClass() method that's used in test classes. 2020-11-15 13:59:32 +00:00
auth.php App Passwords: Prevent conflicts when Basic Auth is already used by the site. 2020-12-04 21:42:52 +00:00
avatar.php Tests: First pass at using assertSame() instead of assertEquals() in most of the unit tests. 2020-09-02 00:35:36 +00:00
basic.php Tests: First pass at using assertSame() instead of assertEquals() in most of the unit tests. 2020-09-02 00:35:36 +00:00
cache.php Build/Test Tools: Don't mark the Tests_Cache::test_flush() test as risky when running the test suite with an object cache in place. 2020-12-21 17:49:20 +00:00
canonical.php Canonical: Support multiple post types in redirect_guess_404_permalink(). 2020-10-18 23:21:03 +00:00
category.php Tests: First pass at using assertSame() instead of assertEquals() in most of the unit tests. 2020-09-02 00:35:36 +00:00
comment-submission.php Build/Test Tools: Standardise the name, signature, and usage of the wpSetUpBeforeClass() method that's used in test classes. 2020-11-15 13:59:32 +00:00
comment.php Build/Test Tools: Standardise the name, signature, and usage of the wpSetUpBeforeClass() method that's used in test classes. 2020-11-15 13:59:32 +00:00
compat.php Tests: Consistently use the expectException() method instead of the older @expectedException annotation. 2020-09-18 13:22:22 +00:00
cron.php Tests: First pass at using assertSame() instead of assertEquals() in most of the unit tests. 2020-09-02 00:35:36 +00:00
db.php Coding Standards: Replace alias PHP functions with the canonical names. 2020-10-18 17:25:10 +00:00
dbdelta.php Tests: First pass at using assertSame() instead of assertEquals() in most of the unit tests. 2020-09-02 00:35:36 +00:00
dependencies.php Tests: First pass at using assertSame() instead of assertEquals() in most of the unit tests. 2020-09-02 00:35:36 +00:00
file.php Tests: First pass at using assertSame() instead of assertEquals() in most of the unit tests. 2020-09-02 00:35:36 +00:00
filters.php Tests: First pass at using assertSame() instead of assertEquals() in most of the unit tests. 2020-09-02 00:35:36 +00:00
functions.php Build/Test Tools: Remove PHP >= 5.3 check. 2020-11-09 19:40:41 +00:00
https-detection.php Security, Site Health: Detect HTTPS support and encourage switching. 2020-12-23 19:11:20 +00:00
kses.php Build/Test Tools: Use dataProviders for some kses tests. 2020-11-25 04:49:04 +00:00
l10n.php Tests: Introduce assertSameSets() and assertSameSetsWithIndex(), and use them where appropriate. 2020-09-04 07:01:00 +00:00
link.php Tests: First pass at using assertSame() instead of assertEquals() in most of the unit tests. 2020-09-02 00:35:36 +00:00
locale.php Tests: Fix the failure in test_get_weekday_undefined_index() on PHP 8. 2020-09-18 10:56:27 +00:00
mail.php Mail: Introduce a pre_wp_mail filter to allow short-circuiting the wp_mail() function without having to override the pluggable function. 2020-12-20 15:07:23 +00:00
media.php Media: Enable lazy-loading of iframes by adding the loading="lazy" attribute to iframe tags on the front-end. 2020-12-16 21:17:24 +00:00
meta.php Tests: Replace a few instances of assertNotEquals() with assertNotFalse(). 2020-09-07 04:11:54 +00:00
multisite.php Tests: First pass at using assertSame() instead of assertEquals() in most of the unit tests. 2020-09-02 00:35:36 +00:00
pluggable.php Cache API: Introduce wp_cache_get_multi(). 2020-06-09 19:45:27 +00:00
post.php Build/Test Tools: Standardise the name, signature, and usage of the wpSetUpBeforeClass() method that's used in test classes. 2020-11-15 13:59:32 +00:00
query.php Tests: Introduce assertSameSets() and assertSameSetsWithIndex(), and use them where appropriate. 2020-09-04 07:01:00 +00:00
rest-api.php REST API: Add support for the oneOf and anyOf keywords. 2020-10-20 18:22:39 +00:00
rewrite.php Tests: First pass at using assertSame() instead of assertEquals() in most of the unit tests. 2020-09-02 00:35:36 +00:00
shortcode.php Tests: Update third-party video URLs in unit tests with more permanent videos. 2020-10-10 01:37:18 +00:00
site-health.php Build/Test Tools: Standardise the name, signature, and usage of the wpSetUpBeforeClass() method that's used in test classes. 2020-11-15 13:59:32 +00:00
taxonomy.php Taxonomy: Revert Light-weight/partial term counts. 2020-10-30 04:57:16 +00:00
template.php Tests: First pass at using assertSame() instead of assertEquals() in most of the unit tests. 2020-09-02 00:35:36 +00:00
term.php Build/Test Tools: Standardise the name, signature, and usage of the wpSetUpBeforeClass() method that's used in test classes. 2020-11-15 13:59:32 +00:00
theme.php Bundled Themes: Make Twenty Twenty-One the default theme. 2020-10-20 02:02:37 +00:00
upload.php Code Modernization: Use explicit visibility for class property declarations. 2020-10-17 16:24:35 +00:00
url.php Tests: First pass at using assertSame() instead of assertEquals() in most of the unit tests. 2020-09-02 00:35:36 +00:00
user.php Tests: Correct @ticket references in some test files. 2020-12-05 15:49:25 +00:00
walker.php Code Modernization: Use explicit visibility for class property declarations. 2020-10-17 16:24:35 +00:00
widgets.php Widgets: Introduce before_sidebar and after_sidebar arguments for register_sidebar(). 2020-10-19 15:38:11 +00:00
wp.php Coding Standards: Fix the remaining issues in /tests. 2019-07-08 00:55:20 +00:00