ResourceInfoFactoryTest
extends TestCase
in package
uses
TestState
Attributes
- #[CoversClass]
- \OpenTelemetry\SDK\Resource\ResourceInfoFactory::class
Table of Contents
Constants
- UNDEFINED = '__undefined'
Properties
- $environmentVariables : array<string|int, mixed>
- $logWriter : LogWriterInterface|MockObject
Methods
- schemaUrlsToMergeProvider() : Generator
- setUp() : void
- test_all_resources_uses_extra_resource_from_registry() : void
- test_composite_default_with_extra_resource_from_registry() : void
- test_default_with_all_sdk_detectors() : void
- test_default_with_none_detectors() : void
- test_empty_resource() : void
- test_logs_warning_for_unknown_detector() : void
- test_merge() : void
- test_merge_schema_url() : void
- test_resource_from_environment_resource_attribute_takes_precedence_over_default() : void
- test_resource_from_environment_service_name_takes_precedence_over_resource_attribute() : void
- test_resource_from_registry() : void
- test_resource_service_name_default() : void
- test_resource_with_empty_environment_variable() : void
- test_resource_with_invalid_environment_variable() : void
- restoreEnvironmentVariables() : void
- setEnvironmentVariable() : void
- tearDownSharedState() : void
Constants
UNDEFINED
private
mixed
UNDEFINED
= '__undefined'
Properties
$environmentVariables
private
array<string|int, mixed>
$environmentVariables
= []
$logWriter
private
LogWriterInterface|MockObject
$logWriter
Methods
schemaUrlsToMergeProvider()
public
static schemaUrlsToMergeProvider() : Generator
Return values
GeneratorsetUp()
public
setUp() : void
test_all_resources_uses_extra_resource_from_registry()
public
test_all_resources_uses_extra_resource_from_registry() : void
test_composite_default_with_extra_resource_from_registry()
public
test_composite_default_with_extra_resource_from_registry() : void
test_default_with_all_sdk_detectors()
public
test_default_with_all_sdk_detectors() : void
test_default_with_none_detectors()
public
test_default_with_none_detectors() : void
test_empty_resource()
public
test_empty_resource() : void
test_logs_warning_for_unknown_detector()
public
test_logs_warning_for_unknown_detector() : void
test_merge()
public
test_merge() : void
test_merge_schema_url()
public
test_merge_schema_url(array<string|int, mixed> $schemaUrlsToMerge, string|null $expectedSchemaUrl) : void
Parameters
- $schemaUrlsToMerge : array<string|int, mixed>
- $expectedSchemaUrl : string|null
Attributes
- #[DataProvider]
- 'schemaUrlsToMergeProvider'
test_resource_from_environment_resource_attribute_takes_precedence_over_default()
public
test_resource_from_environment_resource_attribute_takes_precedence_over_default() : void
Attributes
- #[Group]
- 'compliance'
test_resource_from_environment_service_name_takes_precedence_over_resource_attribute()
public
test_resource_from_environment_service_name_takes_precedence_over_resource_attribute() : void
Attributes
- #[Group]
- 'compliance'
test_resource_from_registry()
public
test_resource_from_registry() : void
test_resource_service_name_default()
public
test_resource_service_name_default() : void
Attributes
- #[Group]
- 'trace-compliance'
test_resource_with_empty_environment_variable()
public
test_resource_with_empty_environment_variable() : void
Attributes
- #[Group]
- 'compliance'
test_resource_with_invalid_environment_variable()
public
test_resource_with_invalid_environment_variable() : void
Attributes
- #[Group]
- 'compliance'
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]