mirror of
https://github.com/Seldaek/monolog.git
synced 2025-08-07 05:36:45 +02:00
Restore rollbar test suite
This commit is contained in:
@@ -53,9 +53,10 @@ class RollbarHandlerTest extends TestCase
|
||||
{
|
||||
$handler = $this->createHandler();
|
||||
|
||||
$handler->handle($this->createExceptionRecord(Level::Debug));
|
||||
$handler->handle($this->getRecord(Level::Debug, context: ['exception' => $e = new Exception()]));
|
||||
|
||||
$this->assertEquals('debug', $this->reportedExceptionArguments['payload']['level']);
|
||||
$this->assertSame($e, $this->reportedExceptionArguments['context']);
|
||||
}
|
||||
|
||||
private function setupRollbarLoggerMock()
|
||||
@@ -82,11 +83,4 @@ class RollbarHandlerTest extends TestCase
|
||||
{
|
||||
return new RollbarHandler($this->rollbarLogger, Level::Debug);
|
||||
}
|
||||
|
||||
private function createExceptionRecord($level = Level::Debug, $message = 'test', $exception = null): array
|
||||
{
|
||||
return $this->getRecord($level, $message, [
|
||||
'exception' => $exception ?: new Exception(),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user