Repository navigation
Port r65272: tidy the Secrets API tests and inline documentation - #19
Merged
Merged
Conversation
Ports r65272 from core trunk. It brings the tests in line with core's PHPUnit guidelines: a summary, @Covers and a failure message for each assertion, @ticket 66187 on each class, single-use data providers named after their test, and multisite-only tests in the ms-required group. It also adds tests for a store that cannot list its secrets, for the pinned WP_SECRETS_ERROR_* values and for a valid but different WP_SECRETS_KEY. In src/ it removes the references to the feature plugin, its proposal and its decision records, including in the _doing_it_wrong() notice for unnamespaced names, and adds @global annotations for the drop-in globals. src/ and the shared test helpers match trunk byte for byte again. The ported test files differ from core only where the plugin's drop-in loader has its own name, and by one blank line the plugin's PHPCS rules require. wp_secrets_api_load_dropin() gets the same @global annotations as core's wp_load_secrets_dropin(). docs/reference/ is regenerated. https://core.trac.wordpress.org/changeset/65272 https://core.trac.wordpress.org/ticket/66187 Props peterwilsoncc.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ports r65272 from core trunk (#66187). It tidies the Secrets API tests and inline documentation:
@coversand a failure message for every assertion, and each class has@ticket 66187. The conformance suites put@coverson the concrete classes. Multisite-only tests use thems-requiredgroup.WP_SECRETS_ERROR_*values, and a valid but differentWP_SECRETS_KEY.src/, the docblocks no longer refer to the feature plugin, its proposal or its decision records, and neither does the_doing_it_wrong()notice for unnamespaced names. The drop-in globals get@globalannotations.With this,
src/and the shared test helpers match trunk byte for byte again.Beyond the straight port:
wp_secrets_api_load_dropin()gets the same@globalannotations that r65272 added to core'swp_load_secrets_dropin().test-wp-secrets-memzero.phpthat the plugin's PHPCS rules require.docs/reference/is regenerated.Testing
Run locally against WordPress 7.1.4:
mainhas 506 tests, because r65272 removes duplicated tests and adds new ones.make reference-checkpasses.Props peterwilsoncc.