c4069a4016
This PR was squashed before being merged into the 2.7 branch (closes #19392).
Discussion
----------
[BrowserKit] Added test for followRedirect method (POST method)
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | ~
| License | MIT
| Doc PR | ~
Test covers 'else' branches in these conditions:
```php
if (in_array($this->internalResponse->getStatus(), array(302, 303))) {
$method = 'get';
$files = array();
$content = null;
} else {
$method = $request->getMethod();
$files = $request->getFiles();
$content = $request->getContent();
}
if ('get' === strtolower($method)) {
// Don't forward parameters for GET request as it should reach the redirection URI
$parameters = array();
} else {
$parameters = $request->getParameters();
}
```
Commits
-------
|
||
---|---|---|
.. | ||
Tests | ||
.gitignore | ||
CHANGELOG.md | ||
Client.php | ||
composer.json | ||
Cookie.php | ||
CookieJar.php | ||
History.php | ||
LICENSE | ||
phpunit.xml.dist | ||
README.md | ||
Request.php | ||
Response.php |
BrowserKit Component
The BrowserKit component simulates the behavior of a web browser, allowing you to make requests, click on links and submit forms programmatically.