-
Notifications
You must be signed in to change notification settings - Fork 196
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
[tests-only][full-ci] removing the setresponse in given/then step in AppConfigurationContext and AuthContext #7186
Conversation
c00a80f
to
0f42e78
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
@@ -884,11 +887,12 @@ public function administratorRequestsURLWithUsingBasicAuth(string $url, string $ | |||
*/ | |||
public function userRequestsURLWithUsingBasicTokenAuth(string $user, string $url, string $method):void { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NOTE: This function is used in the Given steps below which should be prevented. But do it in the next iteration. See the second point todo list (#7082). First, fix all setResponse
usage and then check the reuse of step-def functions in other steps and refactor it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
tests/acceptance/features/bootstrap/AppConfigurationContext.php
Outdated
Show resolved
Hide resolved
tests/acceptance/features/bootstrap/AppConfigurationContext.php
Outdated
Show resolved
Hide resolved
1ab7697
to
f0608fb
Compare
f0608fb
to
14c5f61
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Kudos, SonarCloud Quality Gate passed! |
…AppConfigurationContext and AuthContext (#7186) * removing setting response in the given steps * use response interface * use the returned response * check success response * changed to inline variable * changed variable response_xml to responseXml
Description
We have used setResponse() and $this->response in the Given/Then steps and some helper functions (maybe to reuse existing available methods). But storing responses from Given/Then steps and helper functions is not a good idea because it can lead to a false positive assertion in the Then steps.
So, check the use of setResponse() and $this->response in
So this pr make the above changes in
AppConfigurationContext
andArchiverContext
Related Issue
#7082
Motivation and Context
How Has This Been Tested?
Screenshots (if appropriate):
Types of changes
Checklist: