wordpress-develop/tests/phpunit/tests/theme
Sergey Biryukov 4cee32dd66 Themes: Correct the logic for displaying a _doing_it_wrong() notice for add_theme_support( 'html5' ).
* Calling `add_theme_support( 'html5' )` without passing an array of supported types should throw a `_doing_it_wrong()` notice: "You need to pass an array of types".
* If the second parameter is not specified, it should fall back to an array of `comment-list`, `comment-form`, and `search-form` for backward compatibility.
* If the second parameter is not an array, the function should return `false`.

The latter two points are covered by existing unit tests. The first one is now addressed by `@expectedIncorrectUsage`.

Follow-up to [25193], [25235], [25785].

Props audrasjb, peterwilsoncc, SergeyBiryukov.
Fixes #51657.

git-svn-id: https://develop.svn.wordpress.org/trunk@52828 602fd350-edb4-49c9-b593-d223f7449a82
2022-03-07 14:42:49 +00:00
..
customHeader.php Coding Standards: Add visibility to methods in tests/phpunit/tests/. 2021-11-04 15:22:47 +00:00
getThemeStarterContent.php Coding Standards: Add visibility to methods in tests/phpunit/tests/. 2021-11-04 15:22:47 +00:00
support.php Themes: Correct the logic for displaying a _doing_it_wrong() notice for add_theme_support( 'html5' ). 2022-03-07 14:42:49 +00:00
themeDir.php REST API: Support . in theme directory names in WP_REST_Global_Styles_Controller, WP_REST_Templates_Controller, and WP_REST_Themes_Controller. 2021-12-21 04:12:06 +00:00
wpGetGlobalStylesheet.php Tests: Rename the test file and class for wp_get_global_stylesheet() tests. 2022-02-05 13:19:53 +00:00
wpTheme.php Tests: Use shared fixtures in block theme tests. 2021-12-19 16:23:38 +00:00
wpThemeGetAllowedFilters.php Tests: Use more appropriate assertions in various tests. 2021-07-07 10:32:56 +00:00
wpThemeJson.php Update @wordpress packages 2022-01-04 05:37:25 +00:00
wpThemeJsonResolver.php Themes: Rename public static functions in WP_Theme_JSON_Resolver to remove custom_post_type references. 2021-12-14 16:12:57 +00:00
wpThemeJsonSchema.php Update theme.json classes for WordPress 5.9. 2021-11-08 19:18:39 +00:00