This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
symfony/src/Symfony/Component/BrowserKit
Nicolas Grekas c4069a4016 minor #19392 [BrowserKit] Added test for followRedirect method (POST method) (zomberg)
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
-------

2ace5d8 [BrowserKit] Added test for followRedirect method (POST method)
2016-07-25 18:30:57 +02:00
..
Tests minor #19392 [BrowserKit] Added test for followRedirect method (POST method) (zomberg) 2016-07-25 18:30:57 +02:00
.gitignore Added missing files .gitignore 2013-07-21 14:12:18 +02:00
CHANGELOG.md [BrowserKit] should not follow redirects if status code is not 30x 2013-05-15 17:16:46 +02:00
Client.php [BrowserKit] Uppercase the "GET" method in redirects 2016-07-25 14:54:45 +01:00
composer.json [BrowserKit] Bump dom-crawler minimum version requirement 2016-06-06 16:48:46 +02:00
Cookie.php remove api tags from code 2015-09-28 19:11:22 +02:00
CookieJar.php remove api tags from code 2015-09-28 19:11:22 +02:00
History.php Merge branch '2.3' into 2.5 2014-12-02 21:15:53 +01:00
LICENSE Update copyright year 2016-01-01 23:53:47 -03:00
phpunit.xml.dist Add missing exclusions from phpunit.xml.dist 2015-11-18 09:19:46 +01:00
README.md Updated all the README files 2016-03-04 08:12:06 +01:00
Request.php removed dots at the end of @param and @return 2016-06-28 08:24:06 +02:00
Response.php remove api tags from code 2015-09-28 19:11:22 +02:00

BrowserKit Component

The BrowserKit component simulates the behavior of a web browser, allowing you to make requests, click on links and submit forms programmatically.

Resources