Repository navigation
Conversation
…eme_settings()` tests. Use `self::factory()` instead of the deprecated `$this->factory` property in the three `wp_color_scheme_settings()` tests, which were added after the previous replacement in [64358]. The factory object and test behavior stay the same. See #65819.
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. Core Committers: Use this line as a base for the props when committing in SVN: To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. Props Bot commandsYou can trigger Props Bot actions by commenting on this PR:
|
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are identified for the update to the supported test factory accessor.
No open issues 🎉
What changed in this PR
Updates the wp_color_scheme_settings() tests to use the supported factory accessor, completing the earlier cleanup of deprecated property access.
Changes:
- Replaces
$this->factorywithself::factory()in all three tests. - Preserves user creation, assertions, and test behavior.
| File | Description |
|---|---|
tests/phpunit/tests/admin/includes/misc/wpColorSchemeSettings.php |
Replaces deprecated factory property access in three color-scheme tests. |
Review effort: Balanced
lancewillett
left a comment
There was a problem hiding this comment.
Reviewed the changed code against the implementation and existing coverage; no blocking issue found.
Validated with the related provider/factory patches on current trunk: 1,108 tests and 2,503 assertions in each of single-site and multisite, randomized seed 1101. The same two environment-dependent skips occurred before and after; no failures or errors.
Current-head CI and Copilot review checked.
AI review · gpt-6
Replace deprecated `$this->factory` property access with `self::factory()` in the `wp_color_scheme_settings()` tests. Developed in: #15326 Props soean. See #65819. git-svn-id: https://develop.svn.wordpress.org/trunk@65163 602fd350-edb4-49c9-b593-d223f7449a82
Replace deprecated `$this->factory` property access with `self::factory()` in the `wp_color_scheme_settings()` tests. Developed in: WordPress/wordpress-develop#15326 Props soean. See #65819. Built from https://develop.svn.wordpress.org/trunk@65163 git-svn-id: http://core.svn.wordpress.org/trunk@64312 1a063a9b-81f0-0310-95a4-ce76da25c4cd
|
PR #15326 landed in https://core.trac.wordpress.org/changeset/65163 |
Replaces the deprecated
$this->factoryproperty withself::factory()in the threewp_color_scheme_settings()tests.These tests were added in [r65119] (
Tests: Cover admin configuration helpers.), after the previous sweep in [r64358] replaced all other property accesses. This was the only remaining$this->factoryproperty access in the test suite, flagged by Mago asdeprecated-property.Why this is safe
WP_UnitTestCase_Base::set_up()assigns$this->factory = static::factory(), so both return the same factory object. The test behavior does not change.Trac ticket: https://core.trac.wordpress.org/ticket/65819
This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.