daylerees / anbu

Anbu profiler for the Laravel PHP Framework.
308 stars 24 forks source link

[FEATURE] Disable when 'testing' is true (messes up Behat tests) #11

Closed mikeerickson closed 10 years ago

mikeerickson commented 10 years ago

It took me a bit of time to figure this out, but finally tracked it down.

When Anbu is active, Behat tests get hammered as it shows a message 'redirecting to...' whenever a redirect occurs. So, it falls my checks for 'expect to see'

So, in addition to only having enabled when 'debug' is true, how about disabling when 'testing' is true?

daylerees commented 10 years ago

I think this is just a matter of ensuring that the test environment isn't in debug mode.

bgallagh3r commented 10 years ago

Generally I wouldn't even have this in the config/app.php file (it shouldn't be loaded in production anyways). I would load the service provider in the develop/local env's using the Provider config option seen here: http://laravel.com/docs/configuration#provider-configuration

daylerees commented 10 years ago

Hey Mike, this was fixed by Barry in a recent PR (it now looks at redirects). I've not tagged yet, but will soon. Just wanna clear the other PRs first. Thanks for raising this dude.