TYPO3/testing-framework

Allow to define custom user agent in Functional Tests

DanielSiepmann opened this issue · 0 comments

Does your feature request relate to a problem?

A middleware reacts to the current user agent.
That's currently not possible to test, as the testing framework will always set the agent to "TYPO3 Functional Test Request" at https://github.com/TYPO3/testing-framework/blob/6.9.0/Classes/Core/Functional/Framework/Frontend/RequestBootstrap.php#L121.

Describe the solution you would like

I would propose to check the InternalRequest for corresponding header, and alter https://github.com/TYPO3/testing-framework/blob/6.9.0/Classes/Core/Functional/Framework/Frontend/RequestBootstrap.php#L121 to check for given header and use its value, falling back to current behaviour.

Optionally, describe alternatives you considered

None, I don't have any other proper idea to solve that.