Repository navigation
Tests/connectors: Rename remaining connectors test classes to end with Test - #16527
shail-mehta wants to merge 1 commit into
Conversation
Props for Trac #65208 — align remaining connectors tests with one-unit naming.
There was a problem hiding this comment.
🟢 Approval recommended
No actionable issues were found in the reviewed changes.
No open issues 🎉
What changed in this PR
Standardizes the six remaining connector test filenames and classes to the existing _Test naming convention, supporting ticket #65208.
Changes:
- Renames files and classes to matching
Connectors_*_Testnames. - Leaves test methods, fixtures, groups, and coverage annotations unchanged.
| File | Description |
|---|---|
tests/phpunit/tests/connectors/Connectors_WpRegisterConnector_Test.php |
Renames connector registration tests. |
tests/phpunit/tests/connectors/Connectors_WpGetConnectors_Test.php |
Renames connector listing tests. |
tests/phpunit/tests/connectors/Connectors_WpConnectorsSanitizeApplicationPasswordCredentials_Test.php |
Renames credential sanitization tests. |
tests/phpunit/tests/connectors/Connectors_WpConnectorsRestSettingsDispatch_Test.php |
Renames REST settings dispatch tests. |
tests/phpunit/tests/connectors/Connectors_WpConnectorsGetConnectorScriptModuleData_Test.php |
Renames script module data tests. |
tests/phpunit/tests/connectors/Connectors_WpConnectorRegistry_Test.php |
Renames connector registry tests. |
Review effort: Balanced
|
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:
|
lancewillett
left a comment
There was a problem hiding this comment.
The 6 renamed files match their class names. I compared the affected tests before and after the rename. All 93 cases in each mode kept their assertion counts and outcomes.
AI review · gpt-6
lancewillett
left a comment
There was a problem hiding this comment.
I missed the target of the last rename in my approval. Could you name that file and class Connectors_RegistrationCompanionFunctions_Test? Core has no wp_register_connector() function. The five tests exercise wp_is_connector_registered(), wp_get_connector(), and wp_get_connectors(). The other five file names look good.
AI review · gpt-6
What
Trac Ticket: #65208
Renames the 6 remaining
connectors/test files and classes to match the naming already landed in this directory:wpConnectorRegistry.php/Tests_Connectors_WpConnectorRegistry→Connectors_WpConnectorRegistry_Test.php/Connectors_WpConnectorRegistry_TestwpConnectorsGetConnectorScriptModuleData.php/Tests_Connectors_WpConnectorsGetConnectorScriptModuleData→Connectors_WpConnectorsGetConnectorScriptModuleData_Test.php/Connectors_WpConnectorsGetConnectorScriptModuleData_TestwpConnectorsRestSettingsDispatch.php/Tests_Connectors_WpConnectorsRestSettingsDispatch→Connectors_WpConnectorsRestSettingsDispatch_Test.php/Connectors_WpConnectorsRestSettingsDispatch_TestwpConnectorsSanitizeApplicationPasswordCredentials.php/Tests_Connectors_WpConnectorsSanitizeApplicationPasswordCredentials→Connectors_WpConnectorsSanitizeApplicationPasswordCredentials_Test.php/Connectors_WpConnectorsSanitizeApplicationPasswordCredentials_TestwpConnectorsGetConnectorSettings.php/Tests_Connectors_WpGetConnectors→Connectors_WpGetConnectors_Test.php/Connectors_WpGetConnectors_TestwpRegisterConnector.php/Tests_Connectors_WpRegisterConnector→Connectors_WpRegisterConnector_Test.php/Connectors_WpRegisterConnector_TestWhy
Filename and class name align with the unit under test and end with
_Test, consistent with the already-renamed connectors tests (e.g.Connectors_WpConnectorsGetApiKeySource_Test). This request follows the one-unit naming guidance and keeps the split separate from this rename. No test behavior changes.How
git mvto preserve history@coversannotations, groups, fixtures, and tests unchangedTesting instructions
Use of AI Tools