test: migrate remaining trivial behat features to ApiTestCase#7971
Open
soyuka wants to merge 1 commit into
Open
test: migrate remaining trivial behat features to ApiTestCase#7971soyuka wants to merge 1 commit into
soyuka wants to merge 1 commit into
Conversation
Replaces 13 behat features (xml, issues, sub_resources, push_relations, mercure, json, http_cache, filter) with functional ApiTestCase tests under tests/Functional/. Scenarios map 1:1; sequential behat scenarios (http_cache tags, m2m tag_collector) are consolidated into single test methods that walk through the same sequence with NullPurger resets. New PropertyFilterTest covers resource-relation sparse fieldsets through both #[ApiFilter(PropertyFilter::class)] and #[QueryParameter(filter: ...)] on a new isolated fixture pair (SparseFieldsetParent/Child); the non- resource scenario is already covered by NonResourceTest. TagCollectorTest installs the custom TagCollectorCustom via \$container->set() + KernelBrowser::disableReboot() so the override survives across requests — same pattern as Behat HttpCacheContext. Doctrine, GraphQL, MongoDB, Main, Elasticsearch, Security and Serializer feature sets are intentionally out of scope. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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
Migrates 13 behat features (1107 deletions) to functional ApiTestCase tests under
tests/Functional/, coveringxml,issues,sub_resources,push_relations,mercure,json,http_cacheandfilter.tags, m2mtag_collector) are consolidated into single test methods that walk through the same sequence withNullPurgerresets.PropertyFilterTestcovers resource-relation sparse fieldsets through both#[ApiFilter(PropertyFilter::class)]and#[QueryParameter(filter: ...)]on a new isolated fixture pair (SparseFieldsetParent/Child); the non-resource scenario is already covered byNonResourceTest.TagCollectorTestinstallsTagCollectorCustomvia\$container->set()+KernelBrowser::disableReboot()so the override survives across requests — same pattern Behat'sHttpCacheContext::disableRebootuses.Doctrine, GraphQL, MongoDB, Main, Elasticsearch, Security and Serializer feature sets are intentionally out of scope.
Test plan
vendor/bin/phpunit tests/Functionalpasses (965 tests, 14381 assertions, 1 deprecation, 16 skipped, 11 baseline-ignored issues) aftercomposer update+rm -rf var/cache/test/*..featurefiles (every BehatScenariois mapped to a phpunit test method or data-provider row).🤖 Generated with Claude Code