Repository navigation
Move legacy PHPUnit tests to /tests/Legacy - #4255
Merged
josephsnyder merged 2 commits intoNov 24, 2026
Merged
Conversation
The PHPUnit tests in `app/cdash/tests/case` had their own CTest helper and bootstrap file. This PR moves them to `tests/Legacy`, next to the other test directories, so they're registered and run like every other test there. The tests themselves are unchanged apart from namespaces and imports. Converting them into proper unit or feature tests can follow file by file. - The files move from `app/cdash/tests/case/CDash/...` to `tests/Legacy/...`, dropping the redundant `CDash` directory, and get `Tests\Legacy\...` namespaces. - They're registered with `add_laravel_test` in the same dependency order as before, since several rely on database state left by earlier tests in the chain. The test that most legacy and browser tests wait for is now `/Legacy/XmlHandler/UpdateHandlerTest`. - `add_legacy_unit_test` and `app/cdash/tests/bootstrap.php` are removed. The bootstrap only added `app/cdash` to the include path, which none of the tests needs. - The check for unregistered test files now covers `tests/Legacy`. That turned up `DynamicAnalysisUseCaseTest`, which was never registered and so never ran. It's registered now, and it passes. - `PHPUnitTestTest` is deleted, since it only checked that the autoloader can load a model.
josephsnyder
approved these changes
Nov 24, 2026
josephsnyder
approved these changes
Nov 24, 2026
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.
The PHPUnit tests in
app/cdash/tests/casehad their own CTest helper and bootstrap file. This PR moves them totests/Legacy, next to the other test directories, so they're registered and run like every other test there. The tests themselves are unchanged apart from namespaces and imports. Converting them into proper unit or feature tests can follow file by file.app/cdash/tests/case/CDash/...totests/Legacy/..., dropping the redundantCDashdirectory, and getTests\Legacy\...namespaces.add_laravel_testin the same dependency order as before, since several rely on database state left by earlier tests in the chain. The test that most legacy and browser tests wait for is now/Legacy/XmlHandler/UpdateHandlerTest.add_legacy_unit_testandapp/cdash/tests/bootstrap.phpare removed. The bootstrap only addedapp/cdashto the include path, which none of the tests needs.tests/Legacy. That turned upDynamicAnalysisUseCaseTest, which was never registered and so never ran. It's registered now, and it passes.PHPUnitTestTestis deleted, since it only checked that the autoloader can load a model.