Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

[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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
fabpot merged 1 commit intosymfony:4.4fromdunglas:isolate-browserkit-assertions
Jul 4, 2019

Conversation

@dunglas
Copy link
Member

@dunglasdunglas commentedJun 27, 2019
edited
Loading

QA
Branch?4.3
Bug fix?yes
New feature?no
BC breaks?no
Deprecations?no
Tests pass?yes
Fixed ticketsn/a
LicenseMIT
Doc PRn/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.

@dunglas
Copy link
MemberAuthor

dunglas commentedJun 27, 2019
edited
Loading

Actually, we should create two different traits:

  • One containing only visual assertions, that could be made compatible with Panther, but is useless to test an API
  • Another one for HTTP assertions, that are useful for API testing, but not usable with Panther because W3C WebDriver doesn't give access to the main HTTP request (you cannot retrieve the status code, the headers and other non-visual data).

The current trait canuse both new traits to preserve BC. WDYT?

@dunglasdunglasforce-pushed theisolate-browserkit-assertions branch 2 times, most recently fromcf394c3 to850d193CompareJune 28, 2019 09:34
@dunglasdunglas changed the title[FrameworkBundle] Isolate non-visual assertions for API testing[FrameworkBundle] Allow to use the BrowserKit assertions with Panther and the API Platform testing clientJun 28, 2019
@dunglasdunglas changed the title[FrameworkBundle] Allow to use the BrowserKit assertions with Panther and the API Platform testing client[FrameworkBundle] Allow to use the BrowserKit assertions with Panther and API Platform's test clientJun 28, 2019
@dunglas
Copy link
MemberAuthor

Fixed thegetClient method to allow Panther too. Can this patch qualifies as a bug fix?
Also, maybe these two new traits should be moved in their respective components?

@nicolas-grekasnicolas-grekas added this to thenext milestoneJun 28, 2019
@nicolas-grekas
Copy link
Member

The current trait can use both new traits to preserve BC. WDYT?

makes sense to me

@dunglas
Copy link
MemberAuthor

Maybe could we just merge this one in 4.3 then?

@dunglasdunglasforce-pushed theisolate-browserkit-assertions branch from850d193 toc8f1002CompareJuly 3, 2019 21:27
@dunglasdunglas changed the base branch from4.4 to4.3July 3, 2019 21:28
@dunglasdunglasforce-pushed theisolate-browserkit-assertions branch fromc8f1002 toe85485fCompareJuly 3, 2019 21:30
@fabpotfabpot changed the base branch from4.3 to4.4July 4, 2019 06:46
@fabpotfabpotforce-pushed theisolate-browserkit-assertions branch frome85485f tocd0341eCompareJuly 4, 2019 06:46
@fabpot
Copy link
Member

Thank you@dunglas.

@fabpotfabpot merged commitcd0341e intosymfony:4.4Jul 4, 2019
fabpot added a commit that referenced this pull requestJul 4, 2019
…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     <!-- seehttps://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/aI'm adding a testing client for API Platform that implements the interfaces of HttpClient:api-platform/core#2608Most 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
@dunglasdunglas deleted the isolate-browserkit-assertions branchAugust 20, 2019 18:25
fabpot added a commit that referenced this pull requestAug 21, 2019
…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     <!-- seehttps://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
@nicolas-grekasnicolas-grekas modified the milestones:next,4.4Oct 27, 2019
This was referencedNov 12, 2019
vasilvestre added a commit to vasilvestre/core that referenced this pull requestOct 20, 2023
vasilvestre added a commit to vasilvestre/core that referenced this pull requestOct 20, 2023
soyuka pushed a commit to api-platform/core that referenced this pull requestOct 30, 2023
* ci: fix phpunit???* Unset handler_id for symfony 6.3+* Fix serializer configuration for PHP 8.1 (dev)*Fixapi-platform/api-platform#2437* Fix excepted deprecation in swaggerTrigger deprecation to fit tests. Can change test if neededforgot semicolontry fix deprecation* remove copied WebTestCase to fix 8.1 devPRsymfony/symfony#32207 got merged* fix no deprecation* try tag legacy to valideadd a bc layer for reworked profiler UI* fix warning about deprecated methodensure 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 6fFix tiny bug & deprecation--* fix possible deprecation on 7.4* Update ci.yml* Update ci.yml
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@nicolas-grekasnicolas-grekasnicolas-grekas left review comments

@stofstofstof left review comments

@fabpotfabpotfabpot approved these changes

Assignees

No one assigned

Projects

None yet

Milestone

4.4

Development

Successfully merging this pull request may close these issues.

5 participants

@dunglas@nicolas-grekas@fabpot@stof@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp