1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-08-06 13:16:39 +02:00

Merge pull request #1234 from gmponos/update_phpunit_7

Update to phpunit 7
This commit is contained in:
Jordi Boggiano
2018-11-30 08:26:31 +01:00
committed by GitHub
3 changed files with 16 additions and 8 deletions

View File

@@ -17,7 +17,7 @@
"psr/log": "^1.0.1"
},
"require-dev": {
"phpunit/phpunit": "^6.5",
"phpunit/phpunit": "^7.3",
"graylog2/gelf-php": "^1.4.2",
"sentry/sentry": "^1.9",
"ruflin/elastica": ">=0.90 <3.0",

View File

@@ -273,20 +273,28 @@ class RavenHandlerTest extends TestCase
$handler = $this->getHandler($ravenClient);
$handler->addBreadcrumb($crumb1 = [
'level' => 'info',
'category' => 'test',
'level' => 'info',
'message' => 'Step 1: user auth',
]);
$handler->addBreadcrumb($crumb2 = [
'level' => 'info',
'category' => 'test',
'level' => 'info',
'message' => 'Step 2: prepare user redirect',
]);
$handler->handle($this->getRecord(Logger::ERROR, 'ERROR 💥'));
$this->assertArraySubset([$crumb1, $crumb2], $ravenClient->breadcrumbs->fetch());
$breadcrumbs = $ravenClient->breadcrumbs->fetch();
$this->assertCount(2, $breadcrumbs);
$this->assertSame('test', $breadcrumbs[0]['category']);
$this->assertSame('info', $breadcrumbs[0]['level']);
$this->assertSame('Step 1: user auth', $breadcrumbs[0]['message']);
$this->assertSame('test', $breadcrumbs[1]['category']);
$this->assertSame('info', $breadcrumbs[1]['level']);
$this->assertSame('Step 2: prepare user redirect', $breadcrumbs[1]['message']);
$handler->resetBreadcrumbs();
$handler->handle($this->getRecord(Logger::INFO, 'Hello!'));
$this->assertEmpty($ravenClient->breadcrumbs->fetch());

View File

@@ -90,8 +90,8 @@ class IntrospectionProcessorTest extends TestCase
$expected['extra'] = [
'file' => null,
'line' => null,
'class' => 'ReflectionMethod',
'function' => 'invokeArgs',
'class' => 'PHPUnit\Framework\TestCase',
'function' => 'runTest',
];
$processor = new IntrospectionProcessor(Logger::CRITICAL);
@@ -111,8 +111,8 @@ class IntrospectionProcessorTest extends TestCase
$expected['extra'] = [
'file' => null,
'line' => null,
'class' => 'ReflectionMethod',
'function' => 'invokeArgs',
'class' => 'PHPUnit\Framework\TestCase',
'function' => 'runTest',
];
$processor = new IntrospectionProcessor(Logger::CRITICAL);