EnvironmentTest
extends TestCase
in package
uses
TestState
Attributes
- #[CoversClass]
- \OpenTelemetry\SDK\Resource\Detectors\Environment::class
Table of Contents
Properties
- $detector : Environment
- $environmentVariables : array<string|int, mixed>
Methods
- encodedResourceValueProvider() : array<string|int, mixed>
- setUp() : void
- test_environment_default_get_resource() : void
- test_environment_get_resource_service_name_precedence_over_resource_attributes() : void
- test_environment_get_resource_with_encoded_value() : void
- test_environment_get_resource_with_resource_attributes() : void
- test_environment_get_resource_with_service_name() : void
- test_environment_get_resource_with_service_name_from_resource_attributes() : void
- restoreEnvironmentVariables() : void
- setEnvironmentVariable() : void
- tearDownSharedState() : void
Properties
$detector
private
Environment
$detector
$environmentVariables
private
array<string|int, mixed>
$environmentVariables
= []
Methods
encodedResourceValueProvider()
public
static encodedResourceValueProvider() : array<string|int, mixed>
Return values
array<string|int, mixed>setUp()
public
setUp() : void
test_environment_default_get_resource()
public
test_environment_default_get_resource() : void
test_environment_get_resource_service_name_precedence_over_resource_attributes()
public
test_environment_get_resource_service_name_precedence_over_resource_attributes() : void
test_environment_get_resource_with_encoded_value()
public
test_environment_get_resource_with_encoded_value(string $value, string $expected) : void
Parameters
- $value : string
- $expected : string
Attributes
- #[DataProvider]
- 'encodedResourceValueProvider'
test_environment_get_resource_with_resource_attributes()
public
test_environment_get_resource_with_resource_attributes() : void
test_environment_get_resource_with_service_name()
public
test_environment_get_resource_with_service_name() : void
test_environment_get_resource_with_service_name_from_resource_attributes()
public
test_environment_get_resource_with_service_name_from_resource_attributes() : void
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]