Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Migrate internal tests to the canonical v5 Support layout - #6943

#6943
Merged
TavoNiievez merged 3 commits into
Codeception:mainCodeception/Codeception:mainfrom
TavoNiievez:tests/v5-layout-migrationTavoNiievez/Codeception:tests/v5-layout-migrationCopy head branch name to clipboard
Jun 24, 2026
Merged

Migrate internal tests to the canonical v5 Support layout#6943
TavoNiievez merged 3 commits into
Codeception:mainCodeception/Codeception:mainfrom
TavoNiievez:tests/v5-layout-migrationTavoNiievez/Codeception:tests/v5-layout-migrationCopy head branch name to clipboard

Conversation

@TavoNiievez

Copy link
Copy Markdown
Member

Brings the framework's own self-tests (tests/) in line with the canonical Codeception v5 layout produced by codecept bootstrap and the generators. Structure/config only — no test logic rewritten.

Changes

  • Config hygiene: drop dead suite_class setting; steps:step_decorators:.
  • v5 Support layout: codeception.yml gains namespace: Tests + support_namespace: Support; tests/supporttests/Support (PSR-4 Tests\Support in composer.json).
  • Actors *Guy*Tester; helpers moved to Tests\Support\Helper and referenced by FQCN in suite configs.
  • 5 cli Cests aligned with the v5 Cest generator template (declare(strict_types=1) + final).

Deliberately preserved

tests/data/** (incl. claypit) is left as-is. These are intentionally multi-convention fixtures (global actors, short-name Codeception\Module resolution, namespaced helpers, legacy steps:) — migrating them would delete the coverage they provide.

Verification

cli,unit,coverage green on case-sensitive Linux — identical to the pre-change baseline (the one pre-existing, TTY-width-dependent DataProviderFailuresAndExceptionsCest failure persists and is unrelated).

`generate:cest` produces classes that are `final` and declare
`strict_types=1`; these five Cests predate that template. Add the
missing `declare(strict_types=1)` (5 files) and `final` (4 files) so
the internal suite matches what Codeception itself generates. No
behavioral change.
`settings.suite_class: \PHPUnit_Framework_TestSuite` referenced a class
removed in PHPUnit 6; nothing in src/ reads `suite_class`, so it was
dead config. `tests/cli.suite.yml` used the legacy `steps:` key, which
is silently ignored — the honored v5 key is `step_decorators:`. The
value (ConditionalAssertion) was already applied via the default, so
this is behavior-neutral cleanup.
@TavoNiievez
TavoNiievez force-pushed the tests/v5-layout-migration branch from ad451dd to 6646e50 Compare June 24, 2026 19:42
Adopt namespace: Tests + support_namespace: Support; move
tests/support -> tests/Support (PSR-4 Tests\Support, added to composer
autoload-dev); rename actors CliGuy/CodeGuy/CoverGuy ->
CliTester/CodeTester/CoverTester; move helpers under Tests\Support\Helper
and reference them by FQCN in the suite configs. EmulateModuleHelper
stays in namespace Codeception\Module (classmap-loaded) because several
core unit tests use it as the sample for short-name -> Codeception\Module
resolution. Test references and generated-output assertions updated to
match; fixtures under tests/data/ are left on the legacy layout and
migrated separately.
@TavoNiievez
TavoNiievez force-pushed the tests/v5-layout-migration branch from 6646e50 to a9ef771 Compare June 24, 2026 19:52
@TavoNiievez
TavoNiievez merged commit eb7a6a2 into Codeception:main Jun 24, 2026
10 checks passed
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

Morty Proxy This is a proxified and sanitized view of the page, visit original site.