Skip to content

Commit

Permalink
Merge pull request #20285 from Yoast/20271-fix-incorrect-covers-tags
Browse files Browse the repository at this point in the history
20271 fix incorrect covers tags
  • Loading branch information
vraja-pro committed May 10, 2023
2 parents 69c74b1 + c459abb commit 9539d8a
Show file tree
Hide file tree
Showing 18 changed files with 20 additions and 60 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,6 @@ public function test_get_limited_unindexed_count( $table_exists, $completed_opti
* @covers ::cleanup_postmeta_query
* @covers ::truncate_query
* @covers ::get_postmeta_table
* @covers ::get_aioseo_table
*
* @param array $completed_option The persistent completed option.
* @param int $query_times The times we're gonna run the cleanup queries.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* @group actions
* @group indexing
*
* @coversDefaultClass \Yoast\WP\SEO\Actions\Indexation\Abstract_Link_Indexing_Action
* @coversDefaultClass \Yoast\WP\SEO\Actions\Indexing\Abstract_Link_Indexing_Action
*/
class Abstract_Link_Indexing_Action_Test extends TestCase {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@ protected function set_up() {
* @covers ::__construct
* @covers ::get_total_unindexed
* @covers ::get_count_query
* @covers ::get_post_types
*/
public function test_get_total_unindexed() {
$expected_query = "
Expand Down Expand Up @@ -133,7 +132,6 @@ public function test_get_total_unindexed() {
* Tests the get_limited_unindexed_count method with a limit.
*
* @covers ::__construct
* @covers ::get_post_types
* @covers ::get_select_query
*/
public function test_get_limited_unindexed_count() {
Expand Down Expand Up @@ -175,7 +173,6 @@ public function test_get_limited_unindexed_count() {
*
* @covers ::__construct
* @covers ::get_total_unindexed
* @covers ::get_post_types
*/
public function test_get_total_unindexed_cached() {
Functions\expect( 'get_transient' )->once()->with( 'wpseo_total_unindexed_posts' )->andReturn( '10' );
Expand Down Expand Up @@ -211,7 +208,6 @@ public function test_get_total_unindexed_failed_query() {
*
* @covers ::__construct
* @covers ::get_total_unindexed
* @covers ::get_post_types
*/
public function test_get_total_unindexed_with_excluded_post_types() {
$public_post_types = [ 'public_post_type' ];
Expand Down Expand Up @@ -248,7 +244,6 @@ public function test_get_total_unindexed_with_excluded_post_types() {
* @covers ::__construct
* @covers ::index
* @covers ::get_limit
* @covers ::get_post_types
*/
public function test_index() {
$expected_query = "
Expand Down Expand Up @@ -328,7 +323,6 @@ public function test_index_with_limit_filter_no_int() {
* @covers ::__construct
* @covers ::index
* @covers ::get_limit
* @covers ::get_post_types
*/
public function test_index_with_excluded_post_types() {
$public_post_types = [ 'public_post_type' ];
Expand Down Expand Up @@ -384,7 +378,6 @@ public function test_index_with_excluded_post_types() {
* @covers ::__construct
* @covers ::index
* @covers ::get_limit
* @covers ::get_post_types
*/
public function test_index_no_indexables_created() {
$expected_query = "
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ public function test_set_helper() {
* Tests getting the total unindexed.
*
* @covers ::get_count_query
* @covers \Yoast\WP\SEO\Actions\Indexation\Abstract_Link_Indexing_Action::get_total_unindexed
* @covers \Yoast\WP\SEO\Actions\Indexing\Abstract_Link_Indexing_Action::get_total_unindexed
*/
public function test_get_total_unindexed() {
Functions\expect( 'get_transient' )
Expand Down Expand Up @@ -155,7 +155,6 @@ public function test_get_total_unindexed() {
* @covers ::get_count_query
* @covers ::get_total_unindexed
* @covers ::get_limited_unindexed_count
* @covers \Yoast\WP\SEO\Actions\Indexation\Abstract_Link_Indexing_Action::get_total_unindexed
*/
public function test_get_limited_unindexed_count() {
Functions\expect( 'get_transient' )
Expand Down Expand Up @@ -281,7 +280,6 @@ public function test_index() {
* Tests the index function.
*
* @covers ::get_objects
* @covers \Yoast\WP\SEO\Actions\Indexation\Abstract_Link_Indexing_Action::index
*/
public function test_index_without_link_count() {
Filters\expectApplied( 'wpseo_link_indexing_limit' );
Expand Down
12 changes: 6 additions & 6 deletions tests/unit/actions/indexing/term-link-indexing-action-test.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ public function test_set_helper() {
* Tests getting the unindexed count with a limit.
*
* @covers ::get_count_query
* @covers \Yoast\WP\SEO\Actions\Indexation\Abstract_Link_Indexing_Action::get_total_unindexed
* @covers \Yoast\WP\SEO\Actions\Indexing\Abstract_Link_Indexing_Action::get_total_unindexed
*/
public function test_get_total_unindexed() {
$expected_query = "
Expand Down Expand Up @@ -148,7 +148,7 @@ public function test_get_total_unindexed() {
*
* @covers ::get_count_query
* @covers ::get_total_unindexed
* @covers \Yoast\WP\SEO\Actions\Indexation\Abstract_Link_Indexing_Action::get_limited_unindexed_count
* @covers \Yoast\WP\SEO\Actions\Indexing\Abstract_Link_Indexing_Action::get_limited_unindexed_count
*/
public function test_get_limited_unindexed_count() {
$expected_query = "
Expand Down Expand Up @@ -194,7 +194,7 @@ public function test_get_limited_unindexed_count() {
/**
* Tests getting the total unindexed.
*
* @covers \Yoast\WP\SEO\Actions\Indexation\Abstract_Link_Indexing_Action::get_total_unindexed
* @covers \Yoast\WP\SEO\Actions\Indexing\Abstract_Link_Indexing_Action::get_total_unindexed
*/
public function test_get_total_unindexed_cached() {
Functions\expect( 'get_transient' )
Expand All @@ -208,7 +208,7 @@ public function test_get_total_unindexed_cached() {
/**
* Tests getting the total unindexed.
*
* @covers \Yoast\WP\SEO\Actions\Indexation\Abstract_Link_Indexing_Action::get_total_unindexed
* @covers \Yoast\WP\SEO\Actions\Indexing\Abstract_Link_Indexing_Action::get_total_unindexed
*/
public function test_get_total_unindexed_failed_query() {
Functions\expect( 'get_transient' )
Expand Down Expand Up @@ -255,7 +255,7 @@ public function test_get_total_unindexed_failed_query() {
* Tests the index function.
*
* @covers ::get_objects
* @covers \Yoast\WP\SEO\Actions\Indexation\Abstract_Link_Indexing_Action::index
* @covers \Yoast\WP\SEO\Actions\Indexing\Abstract_Link_Indexing_Action::index
*/
public function test_index() {
Filters\expectApplied( 'wpseo_link_indexing_limit' );
Expand Down Expand Up @@ -322,7 +322,7 @@ public function test_index() {
* Tests the index function.
*
* @covers ::get_objects
* @covers \Yoast\WP\SEO\Actions\Indexation\Abstract_Link_Indexing_Action::index
* @covers \Yoast\WP\SEO\Actions\Indexing\Abstract_Link_Indexing_Action::index
*/
public function test_index_without_link_count() {
Filters\expectApplied( 'wpseo_link_indexing_limit' );
Expand Down
9 changes: 0 additions & 9 deletions tests/unit/conditionals/front-end-conditional-test.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,6 @@ public function set_up() {
$this->instance = new Front_End_Conditional();
}

/**
* Tests if the needed attributes are set correctly.
*
* @covers ::__construct
*/
public function test_construct() {
$this->assertInstanceOf( Front_End_Conditional::class, $this->instance );
}

/**
* Tests that the conditional is met when is_admin is false.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
*
* @group exceptions
*
* @coversDefaultClass \Yoast\WP\SEO\Exceptions\Indexable\Aioseo_Validation_Exception
* @coversDefaultClass \Yoast\WP\SEO\Exceptions\Importing\Aioseo_Validation_Exception
*/
class Aioseo_Validation_Exception_Test extends TestCase {

Expand Down
2 changes: 1 addition & 1 deletion tests/unit/helpers/crawl-cleanup-helper-test.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
/**
* Class Crawl_Cleanup_Helper_Test.
*
* @coversDefaultClass \Yoast\WP\SEO\Initializers\Crawl_Cleanup_Helper
* @coversDefaultClass \Yoast\WP\SEO\Helpers\Crawl_Cleanup_Helper
*
* @group integrations
*/
Expand Down
1 change: 0 additions & 1 deletion tests/unit/initializers/woocommerce-test.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ protected function set_up() {
/**
* Tests the initialization.
*
* @covers ::__construct
* @covers ::initialize
*/
public function test_initialize() {
Expand Down
8 changes: 0 additions & 8 deletions tests/unit/integrations/cleanup-integration-test.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,6 @@ public function test_get_conditionals() {
*
* @covers ::run_cleanup
* @covers ::get_cleanup_tasks
* @covers ::clean_indexables_with_object_type_and_object_sub_type
* @covers ::clean_indexables_with_post_status
* @covers ::cleanup_orphaned_from_table
* @covers ::get_limit
* @covers ::reset_cleanup
*/
Expand Down Expand Up @@ -125,9 +122,6 @@ public function test_run_cleanup() {
*
* @covers ::run_cleanup
* @covers ::get_cleanup_tasks
* @covers ::clean_indexables_with_object_type_and_object_sub_type
* @covers ::clean_indexables_with_post_status
* @covers ::cleanup_orphaned_from_table
* @covers ::get_limit
* @covers ::reset_cleanup
*/
Expand Down Expand Up @@ -157,7 +151,6 @@ public function test_run_cleanup_db_query_failed() {
* @covers ::get_cleanup_tasks
* @covers ::get_limit
* @covers ::reset_cleanup
* @covers ::clean_indexables_with_object_type_and_object_sub_type
* @covers ::start_cron_job
*/
public function test_run_cleanup_starts_cron_job() {
Expand Down Expand Up @@ -226,7 +219,6 @@ public function test_run_cleanup_cron_next_task() {
* @covers ::run_cleanup_cron
* @covers ::get_cleanup_tasks
* @covers ::get_limit
* @covers ::cleanup_orphaned_from_table
* @covers ::start_cron_job
*/
public function test_run_cleanup_cron_last_task() {
Expand Down
15 changes: 5 additions & 10 deletions tests/unit/integrations/front-end/robots-txt-integration-test.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,7 @@ public function test_register_hooks() {
* Tests the robots filter for a public site, with sitemaps.
*
* @covers ::filter_robots
* @covers ::change_default_robots
* @covers ::add_xml_sitemap
* @covers ::maybe_add_xml_sitemap
*/
public function test_public_site_with_sitemaps() {
global $wp_rewrite;
Expand Down Expand Up @@ -174,8 +173,7 @@ public function test_public_site_with_sitemaps() {
* @dataProvider multisite_provider
*
* @covers ::filter_robots
* @covers ::change_default_robots
* @covers ::add_xml_sitemap
* @covers ::maybe_add_xml_sitemap
* @covers ::add_subdirectory_multisite_xml_sitemaps
* @covers ::get_xml_sitemaps_enabled
* @covers ::is_sitemap_allowed
Expand Down Expand Up @@ -300,8 +298,7 @@ public function multisite_provider() {
* Tests the robots filter for multisite installations, other site without Yoast SEO activated.
*
* @covers ::filter_robots
* @covers ::change_default_robots
* @covers ::add_xml_sitemap
* @covers ::maybe_add_xml_sitemap
* @covers ::add_subdirectory_multisite_xml_sitemaps
* @covers ::get_xml_sitemaps_enabled
* @covers ::is_sitemap_allowed
Expand Down Expand Up @@ -382,8 +379,7 @@ public function test_multisite_sitemaps_without_yoast_seo_active() {
* Tests the robots filter for a multisite subdirectory installation without any existing option rows.
*
* @covers ::filter_robots
* @covers ::change_default_robots
* @covers ::add_xml_sitemap
* @covers ::maybe_add_xml_sitemap
* @covers ::add_subdirectory_multisite_xml_sitemaps
* @covers ::get_xml_sitemaps_enabled
* @covers ::is_sitemap_allowed
Expand Down Expand Up @@ -463,8 +459,7 @@ public function test_multisite_sitemaps_option_not_found() {
* Tests the robots filter for a public site, without sitemaps.
*
* @covers ::filter_robots
* @covers ::change_default_robots
* @covers ::add_xml_sitemap
* @covers ::maybe_add_xml_sitemap
*/
public function test_public_site_without_sitemaps() {
$this->options_helper
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/integrations/settings-integration-test.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public function test_get_conditionals() {
/**
* Tests the addition of a submenu page.
*
* @covers ::add_submenu_page
* @covers ::add_settings_saved_page
*/
public function test_add_submenu_page() {

Expand Down
6 changes: 0 additions & 6 deletions tests/unit/integrations/third-party/woocommerce-test.php
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,6 @@ public function test_get_page_id_for_non_shop_page() {
* Tests the situation where the WooCommerce function doesn't exist (for some reason).
*
* @covers ::get_page_id
* @covers ::get_shop_page_id
*/
public function test_get_page_id_when_woocommerce_function_does_not_exist() {
// Sets the stubs.
Expand All @@ -250,7 +249,6 @@ public function test_get_page_id_when_woocommerce_function_does_not_exist() {
* Tests the happy path where we have a page id.
*
* @covers ::get_page_id
* @covers ::get_shop_page_id
*/
public function test_get_page_id() {
$this->woocommerce_helper->expects( 'is_shop_page' )
Expand All @@ -270,8 +268,6 @@ public function test_get_page_id() {
* @dataProvider meta_value_provider
*
* @covers ::title
* @covers ::is_shop_page
* @covers ::get_shop_page_id
*
* @param string $expected The expected value.
* @param string $model_value Value that is set as indexable title.
Expand Down Expand Up @@ -315,8 +311,6 @@ public function test_title( $expected, $model_value, $template_value, $is_shop_p
* @dataProvider meta_value_provider
*
* @covers ::description
* @covers ::is_shop_page
* @covers ::get_shop_page_id
*
* @param string $expected The expected value.
* @param string $model_value Value that is set as indexable title.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ public function test_get_permalink() {
* Tests the permalink getter method with dynamic permalinks enabled.
*
* @covers ::generate_permalink
* @covers ::get_permalink
*/
public function test_get_permalink_with_dynamic_permalinks() {
$this->indexable->permalink = 'https://example.com/permalink/';
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/surfaces/helpers-surface-test.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public function test_magic_get( $helper_name, $classname ) {
/**
* The get method should rethrow exceptions from the container.
*
* @covers ::get
* @covers ::__get
* @dataProvider provide_classes
*
* @param string $helper_name Helper name.
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/surfaces/open-graph-helpers-surface-test.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public function test_magic_get( $helper_name, $classname ) {
/**
* The get method should rethrow exceptions from the container.
*
* @covers ::get
* @covers ::__get
* @dataProvider provide_classes
*
* @param string $helper_name Helper name.
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/surfaces/schema-helpers-surface-test.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public function test_magic_get( $helper_name, $classname ) {
/**
* The get method should rethrow exceptions from the container.
*
* @covers ::get
* @covers ::__get
* @dataProvider provide_classes
*
* @param string $helper_name Helper name.
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/surfaces/twitter-helpers-surface-test.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public function test_magic_get( $helper_name, $classname ) {
/**
* The get method should rethrow exceptions from the container.
*
* @covers ::get
* @covers ::__get
* @dataProvider provide_classes
*
* @param string $helper_name Helper name.
Expand Down

0 comments on commit 9539d8a

Please sign in to comment.