You are here

public function JsonLogDataTest::testLogLevelIsConvertedToRFCLogLevel in JSONlog 8.2

Same name and namespace in other branches
  1. 8 tests/src/Unit/JsonLogDataTest.php \Drupal\Tests\jsonlog\Unit\JsonLogDataTest::testLogLevelIsConvertedToRFCLogLevel()
  2. 3.x tests/src/Unit/JsonLogDataTest.php \Drupal\Tests\jsonlog\Unit\JsonLogDataTest::testLogLevelIsConvertedToRFCLogLevel()

File

tests/src/Unit/JsonLogDataTest.php, line 125

Class

JsonLogDataTest
Unit tests for JsonLogData class

Namespace

Drupal\Tests\jsonlog\Unit

Code

public function testLogLevelIsConvertedToRFCLogLevel() {
  $this->data = new JsonLogData('test_site_id', 'test_canonical');
  $this->data
    ->setSeverity(3);
  $this
    ->assertEquals(new TranslatableMarkup('Error'), $this->data
    ->getSeverity(), 'LogLevel 3 set to Error.');
}