Skip to content

refactor: align test namespaces with vendor prefix#178

Merged
GaryJones merged 1 commit intodevelopfrom
refactor/test-namespaces
Jan 3, 2026
Merged

refactor: align test namespaces with vendor prefix#178
GaryJones merged 1 commit intodevelopfrom
refactor/test-namespaces

Conversation

@GaryJones
Copy link
Contributor

Problem

The test files used Syndication\Tests as their namespace prefix, which didn't align with the plugin's established namespace conventions. All plugin classes use the Automattic\Syndication vendor prefix (as seen in the @package Automattic\Syndication declarations 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\Tests to Automattic\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:

  • 6 integration test files (EncryptionTest, EncryptorMCryptTest, EncryptorOpenSSLTest, EncryptorTestCase, LoggerTest, PullContentTest)
  • 3 unit test files (ClientFactoryTest, EventCounterTest, TestCase)
  • 1 test support file (Syndication_Mock_Client)
  • The tests bootstrap file

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.

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.
@GaryJones GaryJones requested a review from a team as a code owner January 3, 2026 13:50
@GaryJones GaryJones self-assigned this Jan 3, 2026
@GaryJones GaryJones added the type: maintenance Routine maintenance and code quality improvements label Jan 3, 2026
@GaryJones GaryJones added this to the 2.1.0 milestone Jan 3, 2026
@GaryJones GaryJones merged commit 2720aa1 into develop Jan 3, 2026
8 checks passed
@GaryJones GaryJones deleted the refactor/test-namespaces branch January 3, 2026 16:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: maintenance Routine maintenance and code quality improvements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant