refactor: align test namespaces with vendor prefix#178
Merged
Conversation
Updates test file namespaces from Syndication\Tests to Automattic\Syndication\Tests to match the plugin's namespace conventions and @Package declarations already present in docblocks. This ensures consistency across the codebase where production code uses the Automattic vendor prefix whilst test code previously omitted it. The change affects integration tests, unit tests, and the test bootstrap file.
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.
Problem
The test files used
Syndication\Testsas their namespace prefix, which didn't align with the plugin's established namespace conventions. All plugin classes use theAutomattic\Syndicationvendor prefix (as seen in the@package Automattic\Syndicationdeclarations already present in docblocks), but the test namespace hierarchy didn't reflect this structure.This inconsistency made the codebase harder to understand and could cause confusion when working with autoloaders or namespace-aware tooling that expects the vendor prefix to be consistent across the entire codebase.
Solution
Updated the namespace declarations in all test files and the bootstrap file from
Syndication\TeststoAutomattic\Syndication\Tests. This brings the test namespace structure into alignment with the plugin's established conventions whilst maintaining the clear separation between production code and test code.The changes affect:
Each change is a single line modification to the namespace declaration at the top of the file. The refactoring maintains all existing functionality whilst establishing proper namespace conventions for future test development.