chore(tests): reorganize Functional/ by feature scope#7958
Merged
Conversation
| Q | A | ------------- | --- | Branch? | 4.3 | Tickets | - | License | MIT | Doc PR | - * delete Functional/Issues/, fold or move its 3 tests to feature-scoped paths * move Issue7354/Issue7490 root tests to Parameters/ and ErrorTest fold * rename 5 IssueNNN/ fixture dirs to feature names * move DefaultParametersAppKernel to Functional/Kernel/ * rename HALCircularReference.php to HalCircularReferenceTest.php and add missing SetupClassResourcesTrait (file was never run by PHPUnit before due to filename mismatch with *Test.php discovery)
The kernel is a test fixture, not a test. It now lives in tests/Fixtures/app/ in the global namespace, alongside the parent AppKernel it extends, and is loaded via bootstrap.php require.
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.
Summary
Cleans up
tests/Functional/so new contributions land in predictable, feature-scoped locations instead of accumulating asIssueNNNNTest.phpat root or underIssues/.Functional/Issues/— every test in it had a clear feature scope; folded or moved each oneIssue7354Test→Parameters/BooleanQueryParameterDefaultTest,Issue7490Testfolded intoErrorTestIssues/Issue6926Test→ErrorTest::testErrorResourceThrownFromProcessorRespectsGroupsIssues/Issue7490Test→ErrorTest::testDataUriExceptionMessageIsNotWrappedIssues/Issue7135Test→Uuid/UuidIriRelationTestIssues/Issue7349Test→Doctrine/PartialPaginationMongoDbTestIssueNNN/fixture dirs to feature names (BooleanQueryParameterDefault/,DataUriFileUpload/,ErrorResourceWithGroups/,PartialPaginationMongo/,UuidIriRelation/); the other 13 existingIssueNNN/fixture dirs are left alone to avoid touching unrelated testsDefaultParametersAppKernel.phpout of the test root intoFunctional/Kernel/(it's not a test); 2 callsites updatedHALCircularReference.php→HalCircularReferenceTest.phpLatent bug surfaced
HALCircularReference.phpwas missing theTestsuffix, so PHPUnit's default*Test.phpdiscovery had never picked it up — the class also lackedSetupClassResourcesTrait, so even if discovered it would have 404'd. Both fixed in this PR (rename + add trait); the test now actually runs and passes.Test plan
vendor/bin/phpunit tests/Functional/ErrorTest.php— 8/8 (was 6/6, +2 from folds)vendor/bin/phpunit tests/Functional/HalCircularReferenceTest.php— 1/1 (newly running)vendor/bin/phpunit tests/Functional/Uuid/UuidIriRelationTest.php— 3/3vendor/bin/phpunit tests/Functional/Parameters/BooleanQueryParameterDefaultTest.php— 3/3vendor/bin/phpunit tests/Functional/Doctrine/PartialPaginationMongoDbTest.php— 2 skipped (MongoDB-only, expected outside MongoDB env)vendor/bin/phpunit tests/Functional/DefaultParametersTest.php tests/Functional/JsonSchema/JsonSchemaWithDefaultParametersTest.php— 4/4 (verifies kernel move callsites)vendor/bin/phpunit tests/Functional/Uuid/ tests/Functional/Doctrine/ tests/Functional/Parameters/— 431 tests, 0 failuresForward-merge note
Deliberately did not create
JsonLd/orHal/subdirs or split monolithic format tests on 4.3 — those are surfacing onmainand any premature reshuffle here would create merge pain.