From e0c1cbf18832ca2fb07217424aeab04781ac04e4 Mon Sep 17 00:00:00 2001 From: Vraja Das Date: Tue, 9 May 2023 10:50:51 +0200 Subject: [PATCH 01/18] updated class path for Abstract_Link_Indexing_Action_Test --- .../actions/indexing/abstract-link-indexing-action-test.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/unit/actions/indexing/abstract-link-indexing-action-test.php b/tests/unit/actions/indexing/abstract-link-indexing-action-test.php index 15173414cee..5dd187d3366 100644 --- a/tests/unit/actions/indexing/abstract-link-indexing-action-test.php +++ b/tests/unit/actions/indexing/abstract-link-indexing-action-test.php @@ -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 { From a5ad5c9e9572513a0a3749bc5d5034ddcd59b7f3 Mon Sep 17 00:00:00 2001 From: Vraja Das Date: Tue, 9 May 2023 10:51:44 +0200 Subject: [PATCH 02/18] Removed unused covers tag from Aioseo_Cleanup_Action_Test --- tests/unit/actions/importing/aioseo-cleanup-action-test.php | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/unit/actions/importing/aioseo-cleanup-action-test.php b/tests/unit/actions/importing/aioseo-cleanup-action-test.php index a7c9fccc2a9..d88ff95794b 100644 --- a/tests/unit/actions/importing/aioseo-cleanup-action-test.php +++ b/tests/unit/actions/importing/aioseo-cleanup-action-test.php @@ -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. From ffce9dab8a8e184b07f9761389730aebb9a146a1 Mon Sep 17 00:00:00 2001 From: Vraja Das Date: Tue, 9 May 2023 13:38:05 +0200 Subject: [PATCH 03/18] Fixed Typo in for get method for twitter helpers surface --- tests/unit/surfaces/twitter-helpers-surface-test.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/unit/surfaces/twitter-helpers-surface-test.php b/tests/unit/surfaces/twitter-helpers-surface-test.php index f5c9b91862f..94704746679 100644 --- a/tests/unit/surfaces/twitter-helpers-surface-test.php +++ b/tests/unit/surfaces/twitter-helpers-surface-test.php @@ -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. From e948e05a3f86976c04d5ca6b38863f715374537e Mon Sep 17 00:00:00 2001 From: Vraja Das Date: Tue, 9 May 2023 13:38:55 +0200 Subject: [PATCH 04/18] Fixed typo for get method in schema helpers surface test --- tests/unit/surfaces/schema-helpers-surface-test.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/unit/surfaces/schema-helpers-surface-test.php b/tests/unit/surfaces/schema-helpers-surface-test.php index 43151546b7a..a8864bf21c6 100644 --- a/tests/unit/surfaces/schema-helpers-surface-test.php +++ b/tests/unit/surfaces/schema-helpers-surface-test.php @@ -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. From ef40b43c89645e95d68efff5758d886b64c7175c Mon Sep 17 00:00:00 2001 From: Vraja Das Date: Tue, 9 May 2023 13:39:30 +0200 Subject: [PATCH 05/18] Fixed type in covers for get method in open graph helpers surface --- tests/unit/surfaces/open-graph-helpers-surface-test.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/unit/surfaces/open-graph-helpers-surface-test.php b/tests/unit/surfaces/open-graph-helpers-surface-test.php index b377dbb7f5d..49f8208fa5e 100644 --- a/tests/unit/surfaces/open-graph-helpers-surface-test.php +++ b/tests/unit/surfaces/open-graph-helpers-surface-test.php @@ -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. From 9f709117271293bafb228c0953c5c54f45999b66 Mon Sep 17 00:00:00 2001 From: Vraja Das Date: Tue, 9 May 2023 13:40:09 +0200 Subject: [PATCH 06/18] Fixed typo in covers for get method in helpers surface --- tests/unit/surfaces/helpers-surface-test.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/unit/surfaces/helpers-surface-test.php b/tests/unit/surfaces/helpers-surface-test.php index 260dd82fb25..a0adbb5b4df 100644 --- a/tests/unit/surfaces/helpers-surface-test.php +++ b/tests/unit/surfaces/helpers-surface-test.php @@ -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. From 6ade0d2b8a2752535067892375490a00c390cadb Mon Sep 17 00:00:00 2001 From: Vraja Das Date: Tue, 9 May 2023 13:41:38 +0200 Subject: [PATCH 07/18] removed covers of a mock in permalink test --- .../unit/presentations/indexable-presentation/permalink-test.php | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/unit/presentations/indexable-presentation/permalink-test.php b/tests/unit/presentations/indexable-presentation/permalink-test.php index a6c376cbd7b..ca1db56e0d1 100644 --- a/tests/unit/presentations/indexable-presentation/permalink-test.php +++ b/tests/unit/presentations/indexable-presentation/permalink-test.php @@ -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/'; From 849d034c4bfb89609e3b9a9cd2c74c2b02740201 Mon Sep 17 00:00:00 2001 From: Vraja Das Date: Tue, 9 May 2023 13:42:32 +0200 Subject: [PATCH 08/18] removed covers for mocks in woocommerce integration test --- tests/unit/integrations/third-party/woocommerce-test.php | 6 ------ 1 file changed, 6 deletions(-) diff --git a/tests/unit/integrations/third-party/woocommerce-test.php b/tests/unit/integrations/third-party/woocommerce-test.php index 61cd2ac85ab..f4e784a2171 100644 --- a/tests/unit/integrations/third-party/woocommerce-test.php +++ b/tests/unit/integrations/third-party/woocommerce-test.php @@ -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. @@ -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' ) @@ -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. @@ -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. From 2dfe1d5d21d9653cfc8d5d51cf009582a5aef0a8 Mon Sep 17 00:00:00 2001 From: Vraja Das Date: Tue, 9 May 2023 13:43:15 +0200 Subject: [PATCH 09/18] Fixed covers for the tested method in settings integration test --- tests/unit/integrations/settings-integration-test.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/unit/integrations/settings-integration-test.php b/tests/unit/integrations/settings-integration-test.php index c094d2d4a3b..56af39e14f5 100644 --- a/tests/unit/integrations/settings-integration-test.php +++ b/tests/unit/integrations/settings-integration-test.php @@ -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() { From 183e835c55a7e670ad504a63c886483570259a13 Mon Sep 17 00:00:00 2001 From: Vraja Das Date: Tue, 9 May 2023 13:47:23 +0200 Subject: [PATCH 10/18] Fixed covers in Robots_Txt_Integration_Test * Removed change_default_robots since it is not a method in the tested class. * fixed typo for maybe_add_xml_sitemap --- .../front-end/robots-txt-integration-test.php | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/tests/unit/integrations/front-end/robots-txt-integration-test.php b/tests/unit/integrations/front-end/robots-txt-integration-test.php index 3099c60345b..6dded46e716 100644 --- a/tests/unit/integrations/front-end/robots-txt-integration-test.php +++ b/tests/unit/integrations/front-end/robots-txt-integration-test.php @@ -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; @@ -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 @@ -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 @@ -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 @@ -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 From 6fd1920c33b84a40ca3283f55bc5a497b6442a2c Mon Sep 17 00:00:00 2001 From: Vraja Das Date: Tue, 9 May 2023 13:49:36 +0200 Subject: [PATCH 11/18] Fixed Cleanup_Integration_Test covers and removed unused imports * Removed unused imports * Removed covers for mocks --- .../unit/integrations/cleanup-integration-test.php | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/tests/unit/integrations/cleanup-integration-test.php b/tests/unit/integrations/cleanup-integration-test.php index 99a43854aa5..72fad449291 100644 --- a/tests/unit/integrations/cleanup-integration-test.php +++ b/tests/unit/integrations/cleanup-integration-test.php @@ -4,16 +4,10 @@ use Brain\Monkey; use Mockery; -use stdClass; use wpdb; -use Yoast\WP\Lib\Model; -use Yoast\WP\SEO\Helpers\Author_Archive_Helper; -use Yoast\WP\SEO\Helpers\Post_Type_Helper; -use Yoast\WP\SEO\Helpers\Taxonomy_Helper; use Yoast\WP\SEO\Integrations\Cleanup_Integration; use Yoast\WP\SEO\Repositories\Indexable_Repository; -use Yoast\WP\SEO\Tests\Unit\Doubles\Models\Indexable_Mock; use Yoast\WP\SEO\Tests\Unit\TestCase; use Yoast\WP\SEO\Repositories\Indexable_Cleanup_Repository; @@ -93,9 +87,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 */ @@ -132,9 +123,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 */ @@ -164,7 +152,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() { @@ -233,7 +220,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() { From d98aeae0146d09f8c8b08d12b18724a787a34961 Mon Sep 17 00:00:00 2001 From: Vraja Das Date: Tue, 9 May 2023 13:50:30 +0200 Subject: [PATCH 12/18] Removed covers in Initializers\Woocommerce_Test There is no construct method in the class. --- tests/unit/initializers/woocommerce-test.php | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/unit/initializers/woocommerce-test.php b/tests/unit/initializers/woocommerce-test.php index 67591da72fa..938d89fa624 100644 --- a/tests/unit/initializers/woocommerce-test.php +++ b/tests/unit/initializers/woocommerce-test.php @@ -33,7 +33,6 @@ protected function set_up() { /** * Tests the initialization. * - * @covers ::__construct * @covers ::initialize */ public function test_initialize() { From 881a5d6ae15d6d4b1f50b7b9de2b7a0894fca9fd Mon Sep 17 00:00:00 2001 From: Vraja Das Date: Tue, 9 May 2023 13:51:23 +0200 Subject: [PATCH 13/18] Fixed path for Crawl_Cleanup_Helper in Crawl_Cleanup_Helper_Test --- tests/unit/helpers/crawl-cleanup-helper-test.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/unit/helpers/crawl-cleanup-helper-test.php b/tests/unit/helpers/crawl-cleanup-helper-test.php index 7e58fe1b052..ec7bc48db66 100644 --- a/tests/unit/helpers/crawl-cleanup-helper-test.php +++ b/tests/unit/helpers/crawl-cleanup-helper-test.php @@ -16,7 +16,7 @@ /** * Class Crawl_Cleanup_Helper_Test. * - * @coversDefaultClass \Yoast\WP\SEO\Initializers\Crawl_Cleanup_Helper + * @coversDefaultClass \Yoast\WP\SEO\Helpers\Crawl_Cleanup_Helper * * @group integrations */ From 25ab2b801d46b541a2acd02389feb564c8c64a15 Mon Sep 17 00:00:00 2001 From: Vraja Das Date: Tue, 9 May 2023 13:51:56 +0200 Subject: [PATCH 14/18] Updated path for Aioseo_Validation_Exception in Tests --- .../exceptions/importing/aioseo-validation-exception-test.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/unit/exceptions/importing/aioseo-validation-exception-test.php b/tests/unit/exceptions/importing/aioseo-validation-exception-test.php index 64ab7ba0754..9073944a05d 100644 --- a/tests/unit/exceptions/importing/aioseo-validation-exception-test.php +++ b/tests/unit/exceptions/importing/aioseo-validation-exception-test.php @@ -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 { From 743e737407c48775d5872e5f51a372e77032a3b7 Mon Sep 17 00:00:00 2001 From: Vraja Das Date: Tue, 9 May 2023 13:52:40 +0200 Subject: [PATCH 15/18] Removed test for construct in Front_End_Conditional_Test There is no construct method in the class. --- tests/unit/conditionals/front-end-conditional-test.php | 9 --------- 1 file changed, 9 deletions(-) diff --git a/tests/unit/conditionals/front-end-conditional-test.php b/tests/unit/conditionals/front-end-conditional-test.php index 9177e2c602f..03416f2d8b0 100644 --- a/tests/unit/conditionals/front-end-conditional-test.php +++ b/tests/unit/conditionals/front-end-conditional-test.php @@ -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. * From e285a0fc9483b3c1ffc617a72258e4bdf8c14bd7 Mon Sep 17 00:00:00 2001 From: Vraja Das Date: Tue, 9 May 2023 13:53:15 +0200 Subject: [PATCH 16/18] Fixed path in covers for the tested method --- .../indexing/term-link-indexing-action-test.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/unit/actions/indexing/term-link-indexing-action-test.php b/tests/unit/actions/indexing/term-link-indexing-action-test.php index 0b2a38f2523..59608a85c9c 100644 --- a/tests/unit/actions/indexing/term-link-indexing-action-test.php +++ b/tests/unit/actions/indexing/term-link-indexing-action-test.php @@ -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 = " @@ -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 = " @@ -195,7 +195,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' ) @@ -209,7 +209,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' ) @@ -256,7 +256,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' ); @@ -323,7 +323,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' ); From 475605648dec5f23842d6d07f0660ada374b7814 Mon Sep 17 00:00:00 2001 From: Vraja Das Date: Tue, 9 May 2023 13:54:12 +0200 Subject: [PATCH 17/18] Fixed path for tested abstract class in Post_Link_Indexing_Action_Test --- .../unit/actions/indexing/post-link-indexing-action-test.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tests/unit/actions/indexing/post-link-indexing-action-test.php b/tests/unit/actions/indexing/post-link-indexing-action-test.php index 8c6753149c4..b782ffdf4fe 100644 --- a/tests/unit/actions/indexing/post-link-indexing-action-test.php +++ b/tests/unit/actions/indexing/post-link-indexing-action-test.php @@ -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' ) @@ -156,7 +156,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' ) @@ -283,7 +282,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' ); From ed36fa6c528a027e1846bc946d22ce5476998e25 Mon Sep 17 00:00:00 2001 From: Vraja Das Date: Tue, 9 May 2023 13:55:52 +0200 Subject: [PATCH 18/18] Removed covers for get_post_types from Indexable_Post_Indexation_Action_Test No such method in the tested class. --- .../indexing/indexable-post-indexation-action-test.php | 7 ------- 1 file changed, 7 deletions(-) diff --git a/tests/unit/actions/indexing/indexable-post-indexation-action-test.php b/tests/unit/actions/indexing/indexable-post-indexation-action-test.php index acf83a6c71a..bec131a7267 100644 --- a/tests/unit/actions/indexing/indexable-post-indexation-action-test.php +++ b/tests/unit/actions/indexing/indexable-post-indexation-action-test.php @@ -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 = " @@ -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() { @@ -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' ); @@ -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' ]; @@ -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 = " @@ -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' ]; @@ -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 = "