Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feature #26791 [BrowserKit] Bypass Header Informations (cfjulien)
This PR was merged into the 4.1-dev branch. Discussion ---------- [BrowserKit] Bypass Header Informations This enables browser Testingtools like mink to pass headerfiles while doing a form submit | Q | A | ------------- | --- | Branch? | master | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | | License | MIT | Doc PR | <!-- Write a short README entry for your feature/bugfix here (replace this comment block.) This will help people understand your PR and can be used as a start of the Doc PR. Additionally: - Bug fixes must be submitted against the lowest branch where they apply (lowest branches are regularly merged to upper ones so they get the fixes too). - Features and deprecations must be submitted against the master branch. --> We tried to do some Browsertesting with Mink and Behat, something like: ```gherkin Scenario Outline: greet in native language Given the browser language is "<lang>" And I called the website When I fill in "PHP" for "username" And I submit the form Then I should see "<greeting>" Examples: | lang | greeting | | en | Hello | | de | Hallo | | fr | Bonjour | | zh | 你好 | | ru | привет | | be | Bonjour | ``` ```php public function theBrowserLanguageIs($arg1) { $this->getSession()->setRequestHeader('Accept', '*/*'); $this->getSession()->setRequestHeader('Accept-Language', $arg1); } ``` While everything works fine with visit form submit didn't send the headers. At Mink theres also an open issue for that minkphp/MinkBrowserKitDriver#79 but actually the problem was between the mink browserkit and the symfony client. Commits ------- fa2063e [BroserKit] Enable passthrew header information on submit
- Loading branch information