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 BrowserKit relative URL redirect assert#44629

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 0 commits intosymfony:6.4fromjulienfalque:relative-redirect-assert
Oct 1, 2023

Conversation

@julienfalque
Copy link
Contributor

QA
Branch?6.1
Bug fix?no
New feature?yes
Deprecations?no
Tickets-
LicenseMIT
Doc PR-

In tests, when asserting a redirect happens, it can be convenient to skip the host part in the expected location, assuming it is the same as the one from the request's URL.

@carsonbotcarsonbot added this to the6.1 milestoneDec 14, 2021
@julienfalquejulienfalqueforce-pushed therelative-redirect-assert branch 5 times, most recently fromc605745 tod864b80CompareDecember 14, 2021 19:26
@fabpotfabpot modified the milestones:6.1,6.2May 20, 2022
@julienfalquejulienfalqueforce-pushed therelative-redirect-assert branch fromd864b80 toa720f67CompareMay 28, 2022 09:28
@nicolas-grekasnicolas-grekas modified the milestones:6.2,6.3Nov 5, 2022
if ($expectedLocation) {
$constraint = LogicalAnd::fromConstraints($constraint,newResponseConstraint\ResponseHeaderSame('Location',$expectedLocation));
if (class_exists(ResponseConstraint\ResponseHeaderLocationSame::class)) {
$locationConstraint =newResponseConstraint\ResponseHeaderLocationSame(self::getRequest(),$expectedLocation);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Would it make sense to have a more genericResponseHeaderUrlSame for all headers consisting of a URL?

Copy link
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

I'm not sure. The behavior forLocation depends on the URL of the request, would this behavior make sense for any kind of URL?

@julienfalquejulienfalqueforce-pushed therelative-redirect-assert branch 3 times, most recently from59deba5 to6cdb5d4CompareDecember 14, 2022 20:00
@nicolas-grekasnicolas-grekas modified the milestones:6.3,6.4May 23, 2023
@fabpot
Copy link
Member

Thank you@julienfalque.

julienfalque reacted with hooray emoji

@fabpotfabpot closed thisOct 1, 2023
@fabpotfabpotforce-pushed therelative-redirect-assert branch from6cdb5d4 tofb4e9aeCompareOctober 1, 2023 07:06
@fabpotfabpot merged commit0f8efc1 intosymfony:6.4Oct 1, 2023
@julienfalquejulienfalque deleted the relative-redirect-assert branchOctober 17, 2023 12:28
@fabpotfabpot mentioned this pull requestOct 21, 2023
@fabpotfabpot mentioned this pull requestOct 21, 2023
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@fabpotfabpotfabpot approved these changes

Assignees

No one assigned

Projects

None yet

Milestone

6.4

Development

Successfully merging this pull request may close these issues.

4 participants

@julienfalque@fabpot@nicolas-grekas@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp