| Conditions | 1 |
| Paths | 1 |
| Total Lines | 17 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 32 | public function testDirectCallOfReportSentryNotificationTriggersNotificationFlow() |
||
| 33 | { |
||
| 34 | $sentryNotifierMock = $this->mock(SentryNotifier::class); |
||
| 35 | |||
| 36 | $sentryNotifierMock->shouldReceive('reportSentryNotification') |
||
| 37 | ->once() |
||
| 38 | ->with(Mockery::type(Exception::class)) |
||
|
|
|||
| 39 | ->andReturnUsing(function () { |
||
| 40 | Notification::send(new NotifableTelegramChannel(123), new TelegramSentryNotification()); |
||
| 41 | }); |
||
| 42 | |||
| 43 | /** @var SentryNotifier $sentryNotifierMock */ |
||
| 44 | $sentryNotifierMock->reportSentryNotification(new Exception('Test exception')); |
||
| 45 | |||
| 46 | Notification::assertSentTo( |
||
| 47 | new NotifableTelegramChannel(123), |
||
| 48 | TelegramSentryNotification::class |
||
| 49 | ); |
||
| 52 |