[HttpFoundation] Improve test coverage
merged branch Inori/tests-coverage (PR #8856)

This PR was squashed before being merged into the master branch (closes #8856).

Discussion
----------

[HttpFoundation] Improve test coverage

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| License       | MIT

Commits
-------

aef78f2 [HttpFoundation] Improve test coverage