public function NewRelicLoggerTest::testIgnoresUnselectedLevelMessages 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::testIgnoresUnselectedLevelMessages()
- 2.0.x tests/src/Unit/Logger/NewRelicLoggerTest.php \Drupal\Tests\new_relic_rpm\Unit\Logger\NewRelicLoggerTest::testIgnoresUnselectedLevelMessages()
Test that log levels not requested are ignored.
File
- tests/
src/ Unit/ Logger/ NewRelicLoggerTest.php, line 67
Class
- NewRelicLoggerTest
- @coversDefaultClass \Drupal\new_relic_rpm\Logger\NewRelicLogger @group new_relic_rpm
Namespace
Drupal\Tests\new_relic_rpm\Unit\LoggerCode
public function testIgnoresUnselectedLevelMessages() {
$adapter = $this
->prophesize(NewRelicAdapterInterface::class);
$adapter
->logError()
->shouldNotBeCalled();
$logger = $this
->getLogger($adapter
->reveal());
$logger
->log(RfcLogLevel::CRITICAL, 'Test', self::$defaultContext);
}