-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[FrameworkBundle] Allow to use the BrowserKit assertions with Panther and API Platform's test client #32207
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
6be0ec4
to
a58a732
Compare
Actually, we should create two different traits:
The current trait can |
cf394c3
to
850d193
Compare
Fixed the |
src/Symfony/Component/DomCrawler/Test/Constraint/CrawlerSelectorAttributeValueSame.php
Outdated
Show resolved
Hide resolved
makes sense to me |
Maybe could we just merge this one in 4.3 then? |
850d193
to
c8f1002
Compare
c8f1002
to
e85485f
Compare
… and API Platform's test client
e85485f
to
cd0341e
Compare
Thank you @dunglas. |
…ns with Panther and API Platform's test client (dunglas) This PR was submitted for the 4.3 branch but it was merged into the 4.4 branch instead (closes #32207). Discussion ---------- [FrameworkBundle] Allow to use the BrowserKit assertions with Panther and API Platform's test client | Q | A | ------------- | --- | Branch? | 4.3 | Bug fix? | yes | New feature? | no <!-- please update src/**/CHANGELOG.md files --> | BC breaks? | no <!-- see https://symfony.com/bc --> | Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files --> | Tests pass? | yes <!-- please add some, will be required by reviewers --> | Fixed tickets | n/a | License | MIT | Doc PR | n/a I'm adding a testing client for API Platform that implements the interfaces of HttpClient: api-platform/core#2608 Most PHPUnit assertions provided by Symfony are useful and can be reused, but the ones using the crawler are not relevant and pollute auto-complete suggestions (because a web API usually returns JSON, not HTML). This PR splits the existing trait to allow reusing the HTTP related assertions only. Commits ------- cd0341e [FrameworkBundle] Allow to use the BrowserKit assertions with Panther and API Platform's test client
…ompatible with Panther (dunglas) This PR was merged into the 4.3 branch. Discussion ---------- [FrameworkBundle] Fix BrowserKit assertions to make them compatible with Panther | Q | A | ------------- | --- | Branch? | 4.3 | Bug fix? | yes | New feature? | no <!-- please update src/**/CHANGELOG.md files --> | BC breaks? | no <!-- see https://symfony.com/bc --> | Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files --> | Tests pass? | yes <!-- please add some, will be required by reviewers --> | Fixed tickets | n/a <!-- #-prefixed issue number(s), if any --> | License | MIT | Doc PR | todo (remove the line telling that these assertions aren't compatible with Panther) Backport of essential fixes provided by #32207. It allows most assertions to work with Panther even when using Symfony 4.3. Commits ------- 2316dc3 [FrameworkBundle] Fix BrowserKit assertions to make them compatible with Panther
* ci: fix phpunit ??? * Unset handler_id for symfony 6.3+ * Fix serializer configuration for PHP 8.1 (dev) * Fix api-platform/api-platform#2437 * Fix excepted deprecation in swagger Trigger deprecation to fit tests. Can change test if needed forgot semicolon try fix deprecation * remove copied WebTestCase to fix 8.1 dev PR symfony/symfony#32207 got merged * fix no deprecation * try tag legacy to valide add a bc layer for reworked profiler UI * fix warning about deprecated method ensure method exists * skip an exceptDeprecation, this case fails for a particular CI run * remove uneccesary changes * change BC deprecation system for doctrine * fix some deprecations about validation html mode and attributes for recent sf * fix doctrine lexer deprecations * fix bootstrap missing * improve doc for sf 6 f Fix tiny bug & deprecation -- * fix possible deprecation on 7.4 * Update ci.yml * Update ci.yml
I'm adding a testing client for API Platform that implements the interfaces of HttpClient: api-platform/core#2608
Most PHPUnit assertions provided by Symfony are useful and can be reused, but the ones using the crawler are not relevant and pollute auto-complete suggestions (because a web API usually returns JSON, not HTML).
This PR splits the existing trait to allow reusing the HTTP related assertions only.