diff --git a/tests/phpunit/tests/dependencies/jquery.php b/tests/phpunit/tests/dependencies/jquery.php index 8c7ed8ed66..33f3b6b9a0 100644 --- a/tests/phpunit/tests/dependencies/jquery.php +++ b/tests/phpunit/tests/dependencies/jquery.php @@ -6,6 +6,9 @@ */ class Tests_Dependencies_jQuery extends WP_UnitTestCase { + /** + * @covers WP_Scripts::query + */ function test_location_of_jquery() { $scripts = new WP_Scripts; wp_default_scripts( $scripts ); @@ -47,6 +50,8 @@ class Tests_Dependencies_jQuery extends WP_UnitTestCase { * @ticket 22896 * * @expectedIncorrectUsage wp_deregister_script + * + * @covers ::wp_script_is */ function test_dont_allow_deregister_core_scripts_in_admin() { set_current_screen( 'edit.php' ); @@ -90,6 +95,8 @@ class Tests_Dependencies_jQuery extends WP_UnitTestCase { /** * @ticket 28404 + * + * @covers ::wp_script_is */ function test_wp_script_is_dep_enqueued() { wp_enqueue_script( 'jquery-ui-accordion' ); @@ -104,6 +111,8 @@ class Tests_Dependencies_jQuery extends WP_UnitTestCase { * Test placing of jQuery in footer. * * @ticket 25247 + * + * @covers WP_Scripts::do_items */ function test_jquery_in_footer() { $scripts = new WP_Scripts; diff --git a/tests/phpunit/tests/dependencies/scripts.php b/tests/phpunit/tests/dependencies/scripts.php index 2b6778954e..cbe13a66df 100644 --- a/tests/phpunit/tests/dependencies/scripts.php +++ b/tests/phpunit/tests/dependencies/scripts.php @@ -2,6 +2,12 @@ /** * @group dependencies * @group scripts + * @covers ::wp_enqueue_script + * @covers ::wp_register_script + * @covers ::wp_print_scripts + * @covers ::wp_script_add_data + * @covers ::wp_add_inline_script + * @covers ::wp_set_script_translations */ class Tests_Dependencies_Scripts extends WP_UnitTestCase { protected $old_wp_scripts; @@ -264,6 +270,10 @@ JS; * Test mismatch of groups in dependencies outputs all scripts in right order. * * @ticket 35873 + * + * @covers WP_Dependencies::add + * @covers WP_Dependencies::enqueue + * @covers WP_Dependencies::do_items */ public function test_group_mismatch_in_deps() { $scripts = new WP_Scripts; diff --git a/tests/phpunit/tests/dependencies/styles.php b/tests/phpunit/tests/dependencies/styles.php index 72931a2e5c..1ffddc95f6 100644 --- a/tests/phpunit/tests/dependencies/styles.php +++ b/tests/phpunit/tests/dependencies/styles.php @@ -2,6 +2,11 @@ /** * @group dependencies * @group scripts + * @covers ::wp_enqueue_style + * @covers ::wp_register_style + * @covers ::wp_print_styles + * @covers ::wp_style_add_data + * @covers ::wp_add_inline_style */ class Tests_Dependencies_Styles extends WP_UnitTestCase { private $old_wp_styles; @@ -349,6 +354,8 @@ CSS; * Tests that visual block styles are enqueued in the editor even when there is not theme support for 'wp-block-styles'. * * Visual block styles should always be enqueued when editing to avoid the appearance of a broken editor. + * + * @covers ::wp_enqueue_style */ function test_block_styles_for_editing_without_theme_support() { // Confirm we are without theme support by default. @@ -365,6 +372,8 @@ CSS; * Tests that visual block styles are enqueued when there is theme support for 'wp-block-styles'. * * Visual block styles should always be enqueued when editing to avoid the appearance of a broken editor. + * + * @covers ::wp_common_block_scripts_and_styles */ function test_block_styles_for_editing_with_theme_support() { add_theme_support( 'wp-block-styles' ); @@ -381,6 +390,8 @@ CSS; * * Visual block styles should not be enqueued unless a theme opts in. * This way we avoid style conflicts with existing themes. + * + * @covers ::wp_enqueue_style */ function test_no_block_styles_for_viewing_without_theme_support() { // Confirm we are without theme support by default. @@ -397,6 +408,8 @@ CSS; * Tests that visual block styles are enqueued for viewing when there is theme support for 'wp-block-styles'. * * Visual block styles should be enqueued when a theme opts in. + * + * @covers ::wp_common_block_scripts_and_styles */ function test_block_styles_for_viewing_with_theme_support() { add_theme_support( 'wp-block-styles' );