Conditions | 3 |
Paths | 1 |
Total Lines | 14 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
11 | public function testExceptionIsReportedToSentry() |
||
12 | { |
||
13 | $this->mock(SentryService::class, function ($mock) { |
||
14 | $mock->shouldReceive('captureException') |
||
15 | ->once() |
||
16 | ->withArgs(function ($exception) { |
||
17 | return $exception instanceof Exception && $exception->getMessage() === 'Test exception'; |
||
18 | }); |
||
19 | }); |
||
20 | |||
21 | try { |
||
22 | throw new Exception('Test exception'); |
||
23 | } catch (Exception $e) { |
||
24 | app(SentryService::class)->captureException($e); |
||
25 | } |
||
28 |