Tests: Correct erroneous @covers
and @use
tags.
Props jipmoors. Fixes #43203. git-svn-id: https://develop.svn.wordpress.org/trunk@42636 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
07bff5d8bd
commit
59e1b7318d
@ -1752,7 +1752,7 @@ class Tests_WP_Customize_Manager extends WP_UnitTestCase {
|
||||
* publishing
|
||||
*
|
||||
* @ticket 39221
|
||||
* @covers _wp_customize_publish_changeset()
|
||||
* @covers ::_wp_customize_publish_changeset()
|
||||
* @see WP_Customize_Widgets::schedule_customize_register()
|
||||
* @see WP_Customize_Widgets::customize_register()
|
||||
*/
|
||||
|
@ -735,7 +735,7 @@ class Tests_Dependencies_Scripts extends WP_UnitTestCase {
|
||||
* Testing `wp_enqueue_code_editor` with file path.
|
||||
*
|
||||
* @ticket 41871
|
||||
* @covers wp_enqueue_code_editor()
|
||||
* @covers ::wp_enqueue_code_editor()
|
||||
*/
|
||||
public function test_wp_enqueue_code_editor_when_php_file_will_be_passed() {
|
||||
$real_file = WP_PLUGIN_DIR . '/hello.php';
|
||||
@ -822,7 +822,7 @@ class Tests_Dependencies_Scripts extends WP_UnitTestCase {
|
||||
* Testing `wp_enqueue_code_editor` with `compact`.
|
||||
*
|
||||
* @ticket 41871
|
||||
* @covers wp_enqueue_code_editor()
|
||||
* @covers ::wp_enqueue_code_editor()
|
||||
*/
|
||||
public function test_wp_enqueue_code_editor_when_generated_array_by_compact_will_be_passed() {
|
||||
$wp_enqueue_code_editor = wp_enqueue_code_editor( compact( 'file' ) );
|
||||
@ -904,7 +904,7 @@ class Tests_Dependencies_Scripts extends WP_UnitTestCase {
|
||||
* Testing `wp_enqueue_code_editor` with `array_merge`.
|
||||
*
|
||||
* @ticket 41871
|
||||
* @covers wp_enqueue_code_editor()
|
||||
* @covers ::wp_enqueue_code_editor()
|
||||
*/
|
||||
public function test_wp_enqueue_code_editor_when_generated_array_by_array_merge_will_be_passed() {
|
||||
$wp_enqueue_code_editor = wp_enqueue_code_editor(
|
||||
@ -1001,7 +1001,7 @@ class Tests_Dependencies_Scripts extends WP_UnitTestCase {
|
||||
* Testing `wp_enqueue_code_editor` with `array`.
|
||||
*
|
||||
* @ticket 41871
|
||||
* @covers wp_enqueue_code_editor()
|
||||
* @covers ::wp_enqueue_code_editor()
|
||||
*/
|
||||
public function test_wp_enqueue_code_editor_when_simple_array_will_be_passed() {
|
||||
$wp_enqueue_code_editor = wp_enqueue_code_editor(
|
||||
|
@ -539,7 +539,7 @@ line 2<br/>
|
||||
* wpautop() should not add extra </p> before <figcaption>
|
||||
*
|
||||
* @covers ::wpautop
|
||||
* @uses trim
|
||||
* @uses ::trim
|
||||
*
|
||||
* @ticket 39307
|
||||
*/
|
||||
|
@ -168,14 +168,14 @@ class Tests_WP_Error extends WP_UnitTestCase {
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers WP_Error:get_error_code()
|
||||
* @covers WP_Error::get_error_code()
|
||||
*/
|
||||
public function test_get_error_code_with_no_errors_should_return_an_empty_string() {
|
||||
$this->assertSame( '', $this->WP_Error->get_error_code() );
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers WP_Error:get_error_code()
|
||||
* @covers WP_Error::get_error_code()
|
||||
*/
|
||||
public function test_get_error_code_with_one_error_should_return_that_error_code() {
|
||||
$this->WP_Error->add( 'code', 'message' );
|
||||
@ -184,7 +184,7 @@ class Tests_WP_Error extends WP_UnitTestCase {
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers WP_Error:get_error_code()
|
||||
* @covers WP_Error::get_error_code()
|
||||
*/
|
||||
public function test_get_error_code_with_multiple_errors_should_return_only_the_first_error_code() {
|
||||
$this->WP_Error->add( 'code', 'message' );
|
||||
|
@ -31,7 +31,7 @@ class Tests_Nav_Menu_Theme_Change extends WP_UnitTestCase {
|
||||
/**
|
||||
* Two themes with one location each should just map, switching to a theme not previously-active.
|
||||
*
|
||||
* @covers wp_map_nav_menu_locations()
|
||||
* @covers ::wp_map_nav_menu_locations()
|
||||
*/
|
||||
function test_one_location_each() {
|
||||
$this->register_nav_menu_locations( array( 'primary' ) );
|
||||
@ -50,7 +50,7 @@ class Tests_Nav_Menu_Theme_Change extends WP_UnitTestCase {
|
||||
/**
|
||||
* Only registered locations should be mapped and returned.
|
||||
*
|
||||
* @covers wp_map_nav_menu_locations()
|
||||
* @covers ::wp_map_nav_menu_locations()
|
||||
*/
|
||||
function test_filter_registered_locations() {
|
||||
$this->register_nav_menu_locations( array( 'primary', 'secondary' ) );
|
||||
@ -71,7 +71,7 @@ class Tests_Nav_Menu_Theme_Change extends WP_UnitTestCase {
|
||||
/**
|
||||
* Locations with the same name should map, switching to a theme not previously-active.
|
||||
*
|
||||
* @covers wp_map_nav_menu_locations()
|
||||
* @covers ::wp_map_nav_menu_locations()
|
||||
*/
|
||||
function test_locations_with_same_slug() {
|
||||
$this->register_nav_menu_locations( array( 'primary', 'secondary' ) );
|
||||
@ -90,7 +90,7 @@ class Tests_Nav_Menu_Theme_Change extends WP_UnitTestCase {
|
||||
/**
|
||||
* If the new theme was previously active, we should honor any changes to nav menu mapping done when the other theme was active.
|
||||
*
|
||||
* @covers wp_map_nav_menu_locations()
|
||||
* @covers ::wp_map_nav_menu_locations()
|
||||
*/
|
||||
function test_new_theme_previously_active() {
|
||||
$this->register_nav_menu_locations( array( 'primary' ) );
|
||||
@ -114,7 +114,7 @@ class Tests_Nav_Menu_Theme_Change extends WP_UnitTestCase {
|
||||
/**
|
||||
* Make educated guesses on theme locations.
|
||||
*
|
||||
* @covers wp_map_nav_menu_locations()
|
||||
* @covers ::wp_map_nav_menu_locations()
|
||||
*/
|
||||
function test_location_guessing() {
|
||||
$this->register_nav_menu_locations( array( 'primary', 'secondary' ) );
|
||||
@ -137,7 +137,7 @@ class Tests_Nav_Menu_Theme_Change extends WP_UnitTestCase {
|
||||
/**
|
||||
* Make sure two locations that fall in the same group don't get the same menu assigned.
|
||||
*
|
||||
* @covers wp_map_nav_menu_locations()
|
||||
* @covers ::wp_map_nav_menu_locations()
|
||||
*/
|
||||
function test_location_guessing_one_menu_per_group() {
|
||||
$this->register_nav_menu_locations( array( 'primary' ) );
|
||||
@ -158,7 +158,7 @@ class Tests_Nav_Menu_Theme_Change extends WP_UnitTestCase {
|
||||
/**
|
||||
* Make sure two locations that fall in the same group get menus assigned from the same group.
|
||||
*
|
||||
* @covers wp_map_nav_menu_locations()
|
||||
* @covers ::wp_map_nav_menu_locations()
|
||||
*/
|
||||
function test_location_guessing_one_menu_per_location() {
|
||||
$this->register_nav_menu_locations( array( 'primary', 'main' ) );
|
||||
@ -181,7 +181,7 @@ class Tests_Nav_Menu_Theme_Change extends WP_UnitTestCase {
|
||||
/**
|
||||
* Technically possible to register menu locations numerically.
|
||||
*
|
||||
* @covers wp_map_nav_menu_locations()
|
||||
* @covers ::wp_map_nav_menu_locations()
|
||||
*/
|
||||
function test_numerical_locations() {
|
||||
$this->register_nav_menu_locations( array( 'primary', 1 ) );
|
||||
|
@ -162,7 +162,7 @@ class Tests_Sanitize_Option extends WP_UnitTestCase {
|
||||
* Test calling get_settings_errors() with variations on where it gets errors from.
|
||||
*
|
||||
* @ticket 42498
|
||||
* @covers get_settings_errors()
|
||||
* @covers ::get_settings_errors()
|
||||
* @global array $wp_settings_errors
|
||||
*/
|
||||
public function test_get_settings_errors_sources() {
|
||||
|
@ -630,7 +630,7 @@ class Test_Nav_Menus extends WP_UnitTestCase {
|
||||
/**
|
||||
* Test _wp_delete_customize_changeset_dependent_auto_drafts.
|
||||
*
|
||||
* @covers _wp_delete_customize_changeset_dependent_auto_drafts()
|
||||
* @covers ::_wp_delete_customize_changeset_dependent_auto_drafts()
|
||||
*/
|
||||
function test_wp_delete_customize_changeset_dependent_auto_drafts() {
|
||||
$auto_draft_post_id = $this->factory()->post->create(
|
||||
|
@ -320,7 +320,7 @@ class Tests_Theme extends WP_UnitTestCase {
|
||||
/**
|
||||
* Test _wp_keep_alive_customize_changeset_dependent_auto_drafts.
|
||||
*
|
||||
* @covers _wp_keep_alive_customize_changeset_dependent_auto_drafts()
|
||||
* @covers ::_wp_keep_alive_customize_changeset_dependent_auto_drafts()
|
||||
*/
|
||||
function test_wp_keep_alive_customize_changeset_dependent_auto_drafts() {
|
||||
$nav_created_post_ids = $this->factory()->post->create_many(
|
||||
|
@ -723,7 +723,7 @@ class Tests_Widgets extends WP_UnitTestCase {
|
||||
/**
|
||||
* Tests for when 'sidebars_widgets' theme mod is populated.
|
||||
*
|
||||
* @covers retrieve_widgets()
|
||||
* @covers ::retrieve_widgets()
|
||||
*/
|
||||
function test_retrieve_widgets_with_theme_mod() {
|
||||
global $sidebars_widgets, $_wp_sidebars_widgets;
|
||||
@ -786,7 +786,7 @@ class Tests_Widgets extends WP_UnitTestCase {
|
||||
/**
|
||||
* Tests for when sidebars widgets matches registered sidebars.
|
||||
*
|
||||
* @covers retrieve_widgets()
|
||||
* @covers ::retrieve_widgets()
|
||||
*/
|
||||
function test_retrieve_widgets_with_sidebars_widgets_matching_registered_sidebars() {
|
||||
global $sidebars_widgets;
|
||||
@ -824,7 +824,7 @@ class Tests_Widgets extends WP_UnitTestCase {
|
||||
/**
|
||||
* Tests for when sidebars widgets doesn't match registered sidebars.
|
||||
*
|
||||
* @covers retrieve_widgets()
|
||||
* @covers ::retrieve_widgets()
|
||||
*/
|
||||
function test_retrieve_widgets_with_sidebars_widgets_not_matching_registered_sidebars() {
|
||||
global $sidebars_widgets, $_wp_sidebars_widgets;
|
||||
@ -918,7 +918,7 @@ class Tests_Widgets extends WP_UnitTestCase {
|
||||
/**
|
||||
* Tests for Customizer mode.
|
||||
*
|
||||
* @covers retrieve_widgets()
|
||||
* @covers ::retrieve_widgets()
|
||||
*/
|
||||
function test_retrieve_widgets_for_customizer() {
|
||||
global $sidebars_widgets, $_wp_sidebars_widgets;
|
||||
@ -990,7 +990,7 @@ class Tests_Widgets extends WP_UnitTestCase {
|
||||
/**
|
||||
* Tests for orphaned widgets being moved into inactive widgets.
|
||||
*
|
||||
* @covers retrieve_widgets()
|
||||
* @covers ::retrieve_widgets()
|
||||
*/
|
||||
function test_retrieve_widgets_move_orphaned_widgets_to_inactive() {
|
||||
global $sidebars_widgets;
|
||||
@ -1025,7 +1025,7 @@ class Tests_Widgets extends WP_UnitTestCase {
|
||||
/**
|
||||
* Test _wp_remove_unregistered_widgets.
|
||||
*
|
||||
* @covers _wp_remove_unregistered_widgets()
|
||||
* @covers ::_wp_remove_unregistered_widgets()
|
||||
*/
|
||||
public function test__wp_remove_unregistered_widgets() {
|
||||
$widgets = array(
|
||||
@ -1055,7 +1055,7 @@ class Tests_Widgets extends WP_UnitTestCase {
|
||||
/**
|
||||
* Two themes with one sidebar each should just map, switching to a theme not previously-active.
|
||||
*
|
||||
* @covers wp_map_sidebars_widgets()
|
||||
* @covers ::wp_map_sidebars_widgets()
|
||||
*/
|
||||
public function test_one_sidebar_each() {
|
||||
$this->register_sidebars( array( 'primary' ) );
|
||||
@ -1075,7 +1075,7 @@ class Tests_Widgets extends WP_UnitTestCase {
|
||||
/**
|
||||
* Sidebars with the same name should map, switching to a theme not previously-active.
|
||||
*
|
||||
* @covers wp_map_sidebars_widgets()
|
||||
* @covers ::wp_map_sidebars_widgets()
|
||||
*/
|
||||
public function test_sidebars_with_same_slug() {
|
||||
$this->register_sidebars( array( 'primary', 'secondary' ) );
|
||||
@ -1093,7 +1093,7 @@ class Tests_Widgets extends WP_UnitTestCase {
|
||||
/**
|
||||
* Make educated guesses on theme sidebars.
|
||||
*
|
||||
* @covers wp_map_sidebars_widgets()
|
||||
* @covers ::wp_map_sidebars_widgets()
|
||||
*/
|
||||
public function test_sidebar_guessing() {
|
||||
$this->register_sidebars( array( 'primary', 'secondary' ) );
|
||||
@ -1116,7 +1116,7 @@ class Tests_Widgets extends WP_UnitTestCase {
|
||||
/**
|
||||
* Make sure two sidebars that fall in the same group don't get the same menu assigned.
|
||||
*
|
||||
* @covers wp_map_sidebars_widgets()
|
||||
* @covers ::wp_map_sidebars_widgets()
|
||||
*/
|
||||
public function test_sidebar_guessing_one_menu_per_group() {
|
||||
$this->register_sidebars( array( 'primary' ) );
|
||||
@ -1137,7 +1137,7 @@ class Tests_Widgets extends WP_UnitTestCase {
|
||||
/**
|
||||
* Make sure two sidebars that fall in the same group get menus assigned from the same group.
|
||||
*
|
||||
* @covers wp_map_sidebars_widgets()
|
||||
* @covers ::wp_map_sidebars_widgets()
|
||||
*/
|
||||
public function test_sidebar_guessing_one_menu_per_sidebar() {
|
||||
$this->register_sidebars( array( 'primary', 'main' ) );
|
||||
|
Loading…
Reference in New Issue
Block a user