2

My site needs to know user location. Using browser's geolocation API is not enough. So it takes user ip and uses geoip database to find out user location. But when I run tests, there's no such thing as client ip. Can I stub it somehow? Laravel's documentation says that one shouldn't stub (or to be precise, mock) Request facade. What do I do then?

x-yuri
  • 16,722
  • 15
  • 114
  • 161

0 Answers0