Skip to content

Move the stray unit_tests/src/Web2project tests under unit_tests/classes/w2p #469

Closed

Description

@caseysoftware

unit_tests/src/Web2project/Output/ holds two tests left over from an earlier attempt at a PSR-0 Web2project\ layout:

  • EmailManagerTest.php, class Web2project_Output_EmailManagerTest, which tests w2p_Output_EmailManager
  • Email/TemplateTest.php, class Web2project_Output_EmailTemplateTest, which tests w2p_Output_Email_Template

Every other core-class test lives under unit_tests/classes/w2p/, mirroring classes/w2p/, and is named w2p_<Path>_<Class>Test. These two are the only files in unit_tests/src/, and that src/ doesn't correspond to any source directory. (composer.json on dev-5.0.0 has a psr-0 entry for Web2project → src/, but src/ doesn't exist.)

They still run, because phpunit.xml scans the whole unit_tests/ directory, but they're easy to miss and they confuse anyone looking for the tests of a given class.

Fix: move them to unit_tests/classes/w2p/Output/EmailManagerTest.php and unit_tests/classes/w2p/Output/Email/TemplateTest.php, rename the classes to w2p_Output_EmailManagerTest and w2p_Output_Email_TemplateTest, and delete unit_tests/src/. If the PSR-4 migration proposal (#470) goes ahead, these get renamed again, so either do this first or fold it into that work.

Activity

  1. added a commit that references this issue on Oct 24, 2026
    ba4fda8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions