OpenTelemetry PHP

LogsMessagesTraitTest extends TestCase
in package
uses TestState

Attributes
#[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

Properties

$environmentVariables

private array<string|int, mixed> $environmentVariables = []

Methods

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>

test_log()

public test_log(string $method, string $expectedLevel) : void
Parameters
$method : string
$expectedLevel : string
Attributes
#[DataProvider]
'logProvider'

test_log_methods()

public test_log_methods(string $method, string $expectedLogLevel) : void
Parameters
$method : string
$expectedLogLevel : string
Attributes
#[DataProvider]
'logLevelProvider'
#[TestDox]
'Proxies logging methods through to logger'

test_logging_respects_configured_otel_log_level()

public test_logging_respects_configured_otel_log_level(string $otelLogLevel, string $method, bool $expected) : void
Parameters
$otelLogLevel : string
$method : string
$expected : bool
Attributes
#[DataProvider]
'otelLogLevelProvider'

restoreEnvironmentVariables()

protected restoreEnvironmentVariables() : void
Attributes
#[After]

setEnvironmentVariable()

protected setEnvironmentVariable(string $variable, mixed $value) : void
Parameters
$variable : string
$value : mixed

tearDownSharedState()

protected tearDownSharedState() : void
Attributes
#[After]

        
On this page

Search results