Skip to content

Commit

Permalink
Code coverage: Fix warnings in scheduled updates package (#40975)
Browse files Browse the repository at this point in the history
* Fix @Covers annotations

* Add changelog
  • Loading branch information
tbradsha authored Jan 13, 2025
1 parent 854e7ec commit 94621b3
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 13 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: fixed

Code: Fix @covers annotations.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
/**
* Test class for Scheduled_Updates_Admin.
*
* @coversDefaultClass Scheduled_Updates_Admin
* @coversDefaultClass Automattic\Jetpack\Scheduled_Updates_Admin
*/
class Scheduled_Updates_Admin_Test extends \WorDBless\BaseTestCase {
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
/**
* Test class for Scheduled_Updates_Health_Paths.
*
* @coversDefaultClass Scheduled_Updates_Health_Paths
* @coversDefaultClass Automattic\Jetpack\Scheduled_Updates_Health_Paths
*/
class Scheduled_Updates_Health_Paths_Test extends \WorDBless\BaseTestCase {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
/**
* Test class for Scheduled_Updates_Logs.
*
* @coversDefaultClass Scheduled_Updates_Logs
* @coversDefaultClass Automattic\Jetpack\Scheduled_Updates_Logs
*/
class Scheduled_Updates_Logs_Test extends \WorDBless\BaseTestCase {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
/**
* Test class for Scheduled_Updates.
*
* @coversDefaultClass Scheduled_Updates
* @coversDefaultClass Automattic\Jetpack\Scheduled_Updates
*/
class Scheduled_Updates_Test extends \WorDBless\BaseTestCase {

Expand Down Expand Up @@ -659,7 +659,7 @@ private function populate_file_with_plugin_header( $plugin_file, $plugin_name )
/**
* Test when all requested plugins are not installed.
*
* @covers ::verify_plugins
* @covers WPCOM_REST_API_V2_Endpoint_Update_Schedules::validate_plugins_param
*/
public function test_verify_plugins_not_installed() {
$plugins = array( 'not-installed-plugin-1/not-installed-plugin-1.php', 'not-installed-plugin-2/not-installed-plugin-2.php' );
Expand All @@ -686,7 +686,7 @@ public function test_verify_plugins_not_installed() {
/**
* Test when all requested plugins are managed.
*
* @covers ::verify_plugins
* @covers WPCOM_REST_API_V2_Endpoint_Update_Schedules::validate_plugins_param
*/
public function test_verify_plugins_all_managed() {
$plugins = array( 'managed-plugin-1/managed-plugin-1.php', 'managed-plugin-2/managed-plugin-2.php' );
Expand All @@ -713,7 +713,7 @@ public function test_verify_plugins_all_managed() {
/**
* Test when one requested plugin is installed and not managed, and another is installed but managed.
*
* @covers ::verify_plugins
* @covers WPCOM_REST_API_V2_Endpoint_Update_Schedules::validate_plugins_param
*/
public function test_verify_plugins_installed_mixed() {
$plugins = array( 'managed-plugin/managed-plugin.php', 'installed-plugin/installed-plugin.php' );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ public function tear_down() {
/**
* Test update_item.
*
* @covers update_item
* @covers ::update_item
*/
public function test_active_is_true_by_default() {
$plugins = array( 'gutenberg/gutenberg.php' );
Expand Down Expand Up @@ -124,7 +124,7 @@ public function test_active_is_true_by_default() {
/**
* Test update_item.
*
* @covers update_item
* @covers ::update_item
*/
public function test_set_active_false_update_active_flag() {
$plugins = array(
Expand Down Expand Up @@ -179,7 +179,7 @@ public function test_set_active_false_update_active_flag() {
/**
* Test update_item.
*
* @covers update_item
* @covers ::update_item
*/
public function test_run_inactive_schedule() {
$plugins = array(
Expand Down Expand Up @@ -217,7 +217,7 @@ public function test_run_inactive_schedule() {
/**
* Test update_item.
*
* @covers update_item
* @covers ::update_item
*/
public function test_run_active_schedule() {
$plugins = array( 'gutenberg/gutenberg.php' );
Expand Down Expand Up @@ -251,7 +251,7 @@ public function test_run_active_schedule() {
/**
* Test update_item update cron.
*
* @covers update_item
* @covers ::update_item
*/
public function test_set_active_false_update_sync_option() {
$plugins = array(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ public function test_updating_autoupdate_plugins_on_create() {
/**
* Can't have more than two schedules.
*
* @covers ::create
* @covers ::create_item
*/
public function test_empty_last_run() {
$plugins = array( 'gutenberg/gutenberg.php' );
Expand Down

0 comments on commit 94621b3

Please sign in to comment.