Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
Added new methods submitForm and clickLink to Client class#27807
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
Uh oh!
There was an error while loading.Please reload this page.
Conversation
| $client->setNextResponse(newResponse('<html><form action="/foo"><input type="submit" value="Register" /></form></html>')); | ||
| $client->request('GET','http://www.example.com/foo/foobar'); | ||
| $client->submitForm('Register',array(),'POST'); |
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.
I think it would be nice to add a test case where actual values are submitted along, this case is not covered right now.
nowiko commentedJul 2, 2018
@iltar Please review that applied changes are suitable. |
linaori commentedJul 2, 2018
Added test looks good to me 👍 |
fabpot commentedJul 3, 2018
I think we also tests for when the link/form is not found. |
nowiko commentedJul 3, 2018
@fabpot |
11bbed3 toe098eddComparefabpot commentedJul 12, 2018
Thank you@nowiko. |
…lass (nowiko)This PR was squashed before being merged into the 4.2-dev branch (closes#27807).Discussion----------Added new methods submitForm and clickLink to Client class| Q | A| ------------- | ---| Branch? | master| Bug fix? | no| New feature? | yes| BC breaks? | no| Deprecations? | no| Tests pass? | yes| License | MITAdded new methods to BrowserKit/Client to simplify work with links and forms.Related to#27627Commits-------e098edd Added new methods submitForm and clickLink to Client class
…itForm() methods (javiereguiluz)This PR was squashed before being merged into the 4.2-dev branch (closes#27956).Discussion----------Added types and tweaked PHPdoc of clickLink() and submitForm() methods| Q | A| ------------- | ---| Branch? | master| Bug fix? | no| New feature? | no <!-- don't forget to update src/**/CHANGELOG.md files -->| BC breaks? | no <!-- seehttps://symfony.com/bc -->| Deprecations? | no <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files -->| Tests pass? | yes <!-- please add some, will be required by reviewers -->| Fixed tickets | - <!-- #-prefixed issue number(s), if any -->| License | MIT| Doc PR | -I wanted to suggest these changes to#27807 but I failed to do that before it was merged.Commits-------be9d578 Added types and tweaked PHPdoc of clickLink() and submitForm() methods
This PR was squashed before being merged into the master branch (closes#10071).Discussion----------Added docs for clickLink() and submitForm()This documentssymfony/symfony#27807Commits-------0668ccc Added docs for clickLink() and submitForm()
stof commentedSep 13, 2018
these 2 methods will trigger a fatal error if you call them before calling |
…(xabbuh)This PR was merged into the 4.2-dev branch.Discussion----------[BrowserKit] throw exception when request() wasn't called| Q | A| ------------- | ---| Branch? | master| Bug fix? | yes| New feature? | no| BC breaks? | no| Deprecations? | no| Tests pass? | yes| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->| License | MIT| Doc PR |symfony/symfony#27807 (comment)Commits-------41cfde19f6 throw exception when request() wasn't called
…(xabbuh)This PR was merged into the 4.2-dev branch.Discussion----------[BrowserKit] throw exception when request() wasn't called| Q | A| ------------- | ---| Branch? | master| Bug fix? | yes| New feature? | no| BC breaks? | no| Deprecations? | no| Tests pass? | yes| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->| License | MIT| Doc PR |#27807 (comment)Commits-------41cfde1 throw exception when request() wasn't called
Added new methods to BrowserKit/Client to simplify work with links and forms.
Related to#27627