anlutro / laravel-4-smart-errors

Smarter error handling for Laravel 4
65 stars 13 forks source link

Add user agent #28

Closed 501st-alpha1 closed 8 years ago

501st-alpha1 commented 8 years ago

I tested this manually and it seems to be working; I can see the user agent in both the error email and the logs.

I was going to try adding a test, but the user_agent comes back as NULL. (As does client_ip, I noticed.) Any ideas for how best to simulate that?

anlutro commented 8 years ago

How did you try setting the header in the test? I think it's something ridiculous like

$this->call('get', '/exception', null, null, null, null, ['HTTP_User-Agent' => 'my-user-agent']
501st-alpha1 commented 8 years ago

Actually, I think I was just trying to add the test to the wrong place. How does this look?

anlutro commented 8 years ago

Looks good!