Skip to content

Move tests directory to top level - #12

Merged
trm42 merged 1 commit into
masterfrom
move-tests-to-top-level
Jun 12, 2026
Merged

trm42 merged 1 commit into
masterfrom
move-tests-to-top-level

Conversation

@trm42

@trm42 trm42 commented Jun 12, 2026

Copy link
Copy Markdown
Owner

What

Relocates the test suite from src/tests/ to a top-level tests/ directory, sitting alongside src/.

Why

Keeping tests nested inside src/ mixed test code with production source. A top-level tests/ directory is the conventional Composer/PHP package layout and keeps the production namespace path (src/) clean.

Changes

  • git mv src/tests → tests for all test and stub files (history preserved).
  • phpunit.xml — testsuite directory updated to ./tests; removed the now-obsolete ./src/tests source-coverage exclude.
  • composer.jsonautoload-dev PSR-4 mapping Trm42\CacheDecorator\Tests\ now points to tests/.
  • CLAUDE.md — updated path references in the Commands section and conventions.

Test namespaces (Trm42\CacheDecorator\Tests) are unchanged, so no PHP source edits were needed.

Verification

composer dump-autoload + full suite: 40 tests, 66 assertions, all passing.

🤖 Generated with Claude Code

Relocate the test suite from src/tests to a top-level tests/ directory,
sitting alongside src/. Update phpunit.xml testsuite/source paths,
composer.json autoload-dev PSR-4 mapping, and CLAUDE.md references.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@trm42
trm42 merged commit 9d694c2 into master Jun 12, 2026
19 checks passed
@trm42
trm42 deleted the move-tests-to-top-level branch June 12, 2026 09:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant