'5']); Mail::assertQueued(MailLog::class); Mail::assertNothingSent(); }); it('does not send a notification when the caller opts out', function () { Mail::fake(); MyLog::writeLog('abo_order', 'error', 'Testfehler', ['errorcode' => '5'], false); Mail::assertNothingQueued(); }); it('does not let a failing notification abort the caller', function () { Mail::shouldReceive('to')->once()->andThrow(new RuntimeException('SMTP down')); MyLog::writeLog('abo_order', 'error', 'Testfehler', ['errorcode' => '5']); expect(true)->toBeTrue(); });