LoggerExporterTest
extends TestCase
in package
uses
LoggerAwareTestTrait
Attributes
- #[CoversClass]
- \OpenTelemetry\SDK\Trace\SpanExporter\LoggerExporter::class
Table of Contents
Constants
- LOG_LEVEL = 'debug'
- SERVICE_NAME = 'LoggerExporterTest'
Properties
- $logger : LoggerInterface|null
Methods
- createExporter() : LoggerExporter
- test_export_granularity_aggregate() : void
- test_export_granularity_span() : void
- test_logger_throws_exception() : void
- createMock() : MockObject
- createSpanConverterInterfaceMock() : SpanConverterInterface
- createSpanMocks() : array<string|int, mixed>
- getLoggerInterfaceMock() : LoggerInterface|MockObject
- createLoggerExporter() : LoggerExporter
Constants
LOG_LEVEL
private
mixed
LOG_LEVEL
= 'debug'
SERVICE_NAME
private
mixed
SERVICE_NAME
= 'LoggerExporterTest'
Properties
$logger
protected
LoggerInterface|null
$logger
Methods
createExporter()
public
createExporter() : LoggerExporter
Return values
LoggerExportertest_export_granularity_aggregate()
public
test_export_granularity_aggregate() : void
Tags
test_export_granularity_span()
public
test_export_granularity_span() : void
Tags
test_logger_throws_exception()
public
test_logger_throws_exception() : void
Tags
createMock()
protected
abstract createMock(string $originalClassName) : MockObject
Parameters
- $originalClassName : string
Return values
MockObjectcreateSpanConverterInterfaceMock()
protected
createSpanConverterInterfaceMock() : SpanConverterInterface
Return values
SpanConverterInterfacecreateSpanMocks()
protected
createSpanMocks() : array<string|int, mixed>
Return values
array<string|int, mixed>getLoggerInterfaceMock()
protected
getLoggerInterfaceMock() : LoggerInterface|MockObject
Tags
Return values
LoggerInterface|MockObjectcreateLoggerExporter()
private
createLoggerExporter([int $granularity = 1 ]) : LoggerExporter
Parameters
- $granularity : int = 1