Page MenuHomeDevCentral

No OneTemporary

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 @@
<?php
namespace Nasqueron\Notifications\Tests\Exceptions;
use Illuminate\Auth\Access\AuthorizationException;
use Nasqueron\Notifications\Exceptions\Handler;
use Nasqueron\Notifications\Tests\TestCase;
use App;
use Config;
use Mockery;
class HandlerTest extends TestCase {
/**
* Illuminate\Foundation\Exceptions\Handler
*/
private $handler;
/**
* Raven_Client
*/
private $ravenClientMock;
public function setUp () {
parent::setUp();
- $this->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);
}
}

File Metadata

Mime Type
text/x-diff
Expires
Sun, May 3, 06:40 (18 h, 36 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3672308
Default Alt Text
(1 KB)

Event Timeline