LogsMessagesTraitTest
extends TestCase
uses
TestState
-
#[CoversClass]
-
\OpenTelemetry\API\Behavior\LogsMessagesTrait::class
Table of Contents
Properties
-
$writer
: MockObject
-
$environmentVariables
: array<string|int, mixed>
Methods
-
logLevelProvider()
: array<string|int, mixed>
-
logProvider()
: array<string|int, mixed>
-
otelLogLevelProvider()
: array<string|int, mixed>
-
setUp()
: void
-
test_log()
: void
-
test_log_methods()
: void
-
test_logging_respects_configured_otel_log_level()
: void
-
restoreEnvironmentVariables()
: void
-
setEnvironmentVariable()
: void
-
tearDownSharedState()
: void
-
createInstance()
: object
$writer
protected
MockObject
$writer
$environmentVariables
private
array<string|int, mixed>
$environmentVariables
= []
logLevelProvider()
public
static logLevelProvider() : array<string|int, mixed>
Return values
array<string|int, mixed>
logProvider()
public
static logProvider() : array<string|int, mixed>
Return values
array<string|int, mixed>
otelLogLevelProvider()
public
static otelLogLevelProvider() : array<string|int, mixed>
Return values
array<string|int, mixed>
setUp()
public
setUp() : void
test_log()
public
test_log(string $method, string $expectedLevel) : void
Parameters
-
$method
: string
-
-
$expectedLevel
: string
-
-
#[DataProvider]
-
'logProvider'
test_log_methods()
public
test_log_methods(string $method, string $expectedLogLevel) : void
Parameters
-
$method
: string
-
-
$expectedLogLevel
: string
-
-
#[DataProvider]
-
'logLevelProvider'
-
#[TestDox]
-
'Proxies logging methods through to logger'
public
test_logging_respects_configured_otel_log_level(string $otelLogLevel, string $method, bool $expected) : void
Parameters
-
$otelLogLevel
: string
-
-
$method
: string
-
-
$expected
: bool
-
-
#[DataProvider]
-
'otelLogLevelProvider'
restoreEnvironmentVariables()
protected
restoreEnvironmentVariables() : void
setEnvironmentVariable()
protected
setEnvironmentVariable(string $variable, mixed $value) : void
Parameters
-
$variable
: string
-
-
$value
: mixed
-
tearDownSharedState()
protected
tearDownSharedState() : void
createInstance()
private
createInstance() : object