diff --git a/tests/Exceptions/HandlerTest.php b/tests/Exceptions/HandlerTest.php index 895f66c..ba60a36 100644 --- a/tests/Exceptions/HandlerTest.php +++ b/tests/Exceptions/HandlerTest.php @@ -1,53 +1,53 @@ handler = new Handler(app()); + $this->handler = new Handler($this->app); $this->mockRavenClient(); } protected function mockRavenClient () { // Inject into our container a mock of Raven_Client $this->ravenClientMock = Mockery::mock('Raven_Client'); $this->app->instance('raven', $this->ravenClientMock); // Environment shouldn't be 'testing' and DSN should be defined, // so Handler::report will call Raven to report to Sentry Config::set('app.env', 'testing-raven'); Config::set('services.sentry.dsn', 'mock'); } public function testRavenReport () { $this->ravenClientMock->shouldReceive('captureException')->once(); $this->handler->report(new \Exception); } public function testExceptionInDontReportArray () { $this->ravenClientMock->shouldReceive('captureException')->never(); $this->handler->report(new AuthorizationException); } }