diff --git a/composer.json b/composer.json index 0d1f4dbc..a7b2aaf8 100644 --- a/composer.json +++ b/composer.json @@ -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", diff --git a/tests/Monolog/Handler/RavenHandlerTest.php b/tests/Monolog/Handler/RavenHandlerTest.php index c80a5763..5ebfbcff 100644 --- a/tests/Monolog/Handler/RavenHandlerTest.php +++ b/tests/Monolog/Handler/RavenHandlerTest.php @@ -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()); diff --git a/tests/Monolog/Processor/IntrospectionProcessorTest.php b/tests/Monolog/Processor/IntrospectionProcessorTest.php index 5f5d9aea..5dabbc51 100644 --- a/tests/Monolog/Processor/IntrospectionProcessorTest.php +++ b/tests/Monolog/Processor/IntrospectionProcessorTest.php @@ -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);