public function NewRelicLoggerTest::testHandlesUnknownLevel in New Relic 8
Same name and namespace in other branches
- 2.x tests/src/Unit/Logger/NewRelicLoggerTest.php \Drupal\Tests\new_relic_rpm\Unit\Logger\NewRelicLoggerTest::testHandlesUnknownLevel()
- 2.0.x tests/src/Unit/Logger/NewRelicLoggerTest.php \Drupal\Tests\new_relic_rpm\Unit\Logger\NewRelicLoggerTest::testHandlesUnknownLevel()
Test that an unknown log level is handled.
File
- tests/
src/ Unit/ Logger/ NewRelicLoggerTest.php, line 109
Class
- NewRelicLoggerTest
- @coversDefaultClass \Drupal\new_relic_rpm\Logger\NewRelicLogger @group new_relic_rpm
Namespace
Drupal\Tests\new_relic_rpm\Unit\LoggerCode
public function testHandlesUnknownLevel() {
$adapter = $this
->prophesize(NewRelicAdapterInterface::class);
$adapter
->logError(Argument::containingString('Severity: (8) Unknown'))
->shouldBeCalled();
$logger = $this
->getLogger($adapter
->reveal(), [
8,
]);
$logger
->log(8, 'My Log Message', self::$defaultContext);
}