[HttpFoundation] Improve test coverage