From 74cb648aea7c3b199f1fc6dc717918e18de96189 Mon Sep 17 00:00:00 2001
From: jrfnl <jrfnl@users.noreply.github.com>
Date: Sun, 14 Mar 2021 02:58:06 +0100
Subject: [PATCH] Build/tests: fix some newly introduced broken @covers tags
---
.../recovery-mode-key-service.php | 30 +++++++++----------
tests/phpunit/tests/http/http.php | 2 +-
2 files changed, 16 insertions(+), 16 deletions(-)
diff --git a/tests/phpunit/tests/error-protection/recovery-mode-key-service.php b/tests/phpunit/tests/error-protection/recovery-mode-key-service.php
index 5d66b4bbff..66f15e6c1e 100644
|
a
|
b
|
class Tests_Recovery_Mode_Key_Service extends WP_UnitTestCase { |
| 8 | 8 | /** |
| 9 | 9 | * @ticket 46130 |
| 10 | 10 | * |
| 11 | | * @covers WP_Recovery_Mode_Cookie_Service::generate_recovery_mode_token |
| 12 | | * @covers WP_Recovery_Mode_Cookie_Service::generate_and_store_recovery_mode_key |
| | 11 | * @covers WP_Recovery_Mode_Key_Service::generate_recovery_mode_token |
| | 12 | * @covers WP_Recovery_Mode_Key_Service::generate_and_store_recovery_mode_key |
| 13 | 13 | */ |
| 14 | 14 | public function test_generate_and_store_recovery_mode_key_returns_recovery_key() { |
| 15 | 15 | $service = new WP_Recovery_Mode_Key_Service(); |
| … |
… |
class Tests_Recovery_Mode_Key_Service extends WP_UnitTestCase { |
| 22 | 22 | /** |
| 23 | 23 | * @ticket 46130 |
| 24 | 24 | * |
| 25 | | * @covers WP_Recovery_Mode_Cookie_Service::validate_recovery_mode_key |
| | 25 | * @covers WP_Recovery_Mode_Key_Service::validate_recovery_mode_key |
| 26 | 26 | */ |
| 27 | 27 | public function test_validate_recovery_mode_key_returns_wp_error_if_no_key_set() { |
| 28 | 28 | $service = new WP_Recovery_Mode_Key_Service(); |
| … |
… |
class Tests_Recovery_Mode_Key_Service extends WP_UnitTestCase { |
| 35 | 35 | /** |
| 36 | 36 | * @ticket 46130 |
| 37 | 37 | * |
| 38 | | * @covers WP_Recovery_Mode_Cookie_Service::validate_recovery_mode_key |
| | 38 | * @covers WP_Recovery_Mode_Key_Service::validate_recovery_mode_key |
| 39 | 39 | */ |
| 40 | 40 | public function test_validate_recovery_mode_key_returns_wp_error_if_data_missing() { |
| 41 | 41 | update_option( 'recovery_keys', 'gibberish' ); |
| … |
… |
class Tests_Recovery_Mode_Key_Service extends WP_UnitTestCase { |
| 50 | 50 | /** |
| 51 | 51 | * @ticket 46130 |
| 52 | 52 | * |
| 53 | | * @covers WP_Recovery_Mode_Cookie_Service::validate_recovery_mode_key |
| | 53 | * @covers WP_Recovery_Mode_Key_Service::validate_recovery_mode_key |
| 54 | 54 | */ |
| 55 | 55 | public function test_validate_recovery_mode_key_returns_wp_error_if_bad() { |
| 56 | 56 | update_option( 'recovery_keys', array( 'token' => 'gibberish' ) ); |
| … |
… |
class Tests_Recovery_Mode_Key_Service extends WP_UnitTestCase { |
| 66 | 66 | /** |
| 67 | 67 | * @ticket 46130 |
| 68 | 68 | * |
| 69 | | * @covers WP_Recovery_Mode_Cookie_Service::validate_recovery_mode_key |
| | 69 | * @covers WP_Recovery_Mode_Key_Service::validate_recovery_mode_key |
| 70 | 70 | */ |
| 71 | 71 | public function test_validate_recovery_mode_key_returns_wp_error_if_stored_format_is_invalid() { |
| 72 | 72 | |
| … |
… |
class Tests_Recovery_Mode_Key_Service extends WP_UnitTestCase { |
| 83 | 83 | /** |
| 84 | 84 | * @ticket 46130 |
| 85 | 85 | * |
| 86 | | * @covers WP_Recovery_Mode_Cookie_Service::validate_recovery_mode_key |
| | 86 | * @covers WP_Recovery_Mode_Key_Service::validate_recovery_mode_key |
| 87 | 87 | */ |
| 88 | 88 | public function test_validate_recovery_mode_key_returns_wp_error_if_empty_key() { |
| 89 | 89 | $service = new WP_Recovery_Mode_Key_Service(); |
| … |
… |
class Tests_Recovery_Mode_Key_Service extends WP_UnitTestCase { |
| 98 | 98 | /** |
| 99 | 99 | * @ticket 46130 |
| 100 | 100 | * |
| 101 | | * @covers WP_Recovery_Mode_Cookie_Service::validate_recovery_mode_key |
| | 101 | * @covers WP_Recovery_Mode_Key_Service::validate_recovery_mode_key |
| 102 | 102 | */ |
| 103 | 103 | public function test_validate_recovery_mode_key_returns_wp_error_if_hash_mismatch() { |
| 104 | 104 | $service = new WP_Recovery_Mode_Key_Service(); |
| … |
… |
class Tests_Recovery_Mode_Key_Service extends WP_UnitTestCase { |
| 113 | 113 | /** |
| 114 | 114 | * @ticket 46130 |
| 115 | 115 | * |
| 116 | | * @covers WP_Recovery_Mode_Cookie_Service::validate_recovery_mode_key |
| | 116 | * @covers WP_Recovery_Mode_Key_Service::validate_recovery_mode_key |
| 117 | 117 | */ |
| 118 | 118 | public function test_validate_recovery_mode_key_returns_wp_error_if_expired() { |
| 119 | 119 | $service = new WP_Recovery_Mode_Key_Service(); |
| … |
… |
class Tests_Recovery_Mode_Key_Service extends WP_UnitTestCase { |
| 133 | 133 | /** |
| 134 | 134 | * @ticket 46130 |
| 135 | 135 | * |
| 136 | | * @covers WP_Recovery_Mode_Cookie_Service::validate_recovery_mode_key |
| | 136 | * @covers WP_Recovery_Mode_Key_Service::validate_recovery_mode_key |
| 137 | 137 | */ |
| 138 | 138 | public function test_validate_recovery_mode_key_returns_true_for_valid_key() { |
| 139 | 139 | $service = new WP_Recovery_Mode_Key_Service(); |
| … |
… |
class Tests_Recovery_Mode_Key_Service extends WP_UnitTestCase { |
| 145 | 145 | /** |
| 146 | 146 | * @ticket 46595 |
| 147 | 147 | * |
| 148 | | * @covers WP_Recovery_Mode_Cookie_Service::validate_recovery_mode_key |
| | 148 | * @covers WP_Recovery_Mode_Key_Service::validate_recovery_mode_key |
| 149 | 149 | */ |
| 150 | 150 | public function test_validate_recovery_mode_key_returns_error_if_token_used_more_than_once() { |
| 151 | 151 | $service = new WP_Recovery_Mode_Key_Service(); |
| … |
… |
class Tests_Recovery_Mode_Key_Service extends WP_UnitTestCase { |
| 164 | 164 | /** |
| 165 | 165 | * @ticket 46595 |
| 166 | 166 | * |
| 167 | | * @covers WP_Recovery_Mode_Cookie_Service::generate_recovery_mode_token |
| 168 | | * @covers WP_Recovery_Mode_Cookie_Service::generate_and_store_recovery_mode_key |
| 169 | | * @covers WP_Recovery_Mode_Cookie_Service::validate_recovery_mode_key |
| | 167 | * @covers WP_Recovery_Mode_Key_Service::generate_recovery_mode_token |
| | 168 | * @covers WP_Recovery_Mode_Key_Service::generate_and_store_recovery_mode_key |
| | 169 | * @covers WP_Recovery_Mode_Key_Service::validate_recovery_mode_key |
| 170 | 170 | */ |
| 171 | 171 | public function test_validate_recovery_mode_key_returns_error_if_token_used_more_than_once_more_than_key_stored() { |
| 172 | 172 | $service = new WP_Recovery_Mode_Key_Service(); |
| … |
… |
class Tests_Recovery_Mode_Key_Service extends WP_UnitTestCase { |
| 190 | 190 | /** |
| 191 | 191 | * @ticket 46595 |
| 192 | 192 | * |
| 193 | | * @covers WP_Recovery_Mode_Cookie_Service::clean_expired_keys |
| | 193 | * @covers WP_Recovery_Mode_Key_Service::clean_expired_keys |
| 194 | 194 | */ |
| 195 | 195 | public function test_clean_expired_keys() { |
| 196 | 196 | $service = new WP_Recovery_Mode_Key_Service(); |
diff --git a/tests/phpunit/tests/http/http.php b/tests/phpunit/tests/http/http.php
index 6799b12cd9..f8ae30e6c2 100644
|
a
|
b
|
class Tests_HTTP_HTTP extends WP_UnitTestCase { |
| 11 | 11 | /** |
| 12 | 12 | * @dataProvider make_absolute_url_testcases |
| 13 | 13 | * |
| 14 | | * @covers ::WP_Http::make_absolute_url |
| | 14 | * @covers WP_Http::make_absolute_url |
| 15 | 15 | */ |
| 16 | 16 | function test_make_absolute_url( $relative_url, $absolute_url, $expected ) { |
| 17 | 17 | $actual = WP_Http::make_absolute_url( $relative_url, $absolute_url ); |