EnvironmentResolverTest
extends TestCase
uses
TestState
-
#[CoversClass]
-
\OpenTelemetry\SDK\Common\Configuration\Resolver\EnvironmentResolver::class
Table of Contents
Constants
-
RAW_VALUES
= ['string' => ['STRING_VAR', 'foo'], 'int' => ['INT_VAR', '42'], 'float' => ['FLOAT_VAR', '4.2'], 'list' => ['LIST_VAR', 'foo,bar,baz'], 'map' => ['MAP_VAR', 'foo=bar,bar=baz']]
Properties
-
$environmentVariables
: array<string|int, mixed>
-
$resolver
: EnvironmentResolver
Methods
-
rawValueProvider()
: array<string|int, mixed>
-
setUp()
: void
-
test_get_array_from_env()
: void
-
test_has_variable()
: void
-
test_has_variable_with_injected_value()
: void
-
test_retrieve_value()
: void
-
test_retrieve_value_no_var()
: void
-
test_retrieve_value_with_injected_value()
: void
-
restoreEnvironmentVariables()
: void
-
setEnvironmentVariable()
: void
-
tearDownSharedState()
: void
-
injectEnvironmentVariable()
: void
RAW_VALUES
private
mixed
RAW_VALUES
= ['string' => ['STRING_VAR', 'foo'], 'int' => ['INT_VAR', '42'], 'float' => ['FLOAT_VAR', '4.2'], 'list' => ['LIST_VAR', 'foo,bar,baz'], 'map' => ['MAP_VAR', 'foo=bar,bar=baz']]
$environmentVariables
private
array<string|int, mixed>
$environmentVariables
= []
$resolver
private
EnvironmentResolver
$resolver
rawValueProvider()
public
static rawValueProvider() : array<string|int, mixed>
Return values
array<string|int, mixed>
setUp()
public
setUp() : void
test_get_array_from_env()
public
test_get_array_from_env() : void
test_has_variable()
public
test_has_variable() : void
test_has_variable_with_injected_value()
public
test_has_variable_with_injected_value() : void
test_retrieve_value()
public
test_retrieve_value(string $varName, string $varValue) : void
Parameters
-
$varName
: string
-
-
$varValue
: string
-
-
#[DataProvider]
-
'rawValueProvider'
test_retrieve_value_no_var()
public
test_retrieve_value_no_var() : void
test_retrieve_value_with_injected_value()
public
test_retrieve_value_with_injected_value() : void
restoreEnvironmentVariables()
protected
restoreEnvironmentVariables() : void
setEnvironmentVariable()
protected
setEnvironmentVariable(string $variable, mixed $value) : void
Parameters
-
$variable
: string
-
-
$value
: mixed
-
tearDownSharedState()
protected
tearDownSharedState() : void
injectEnvironmentVariable()
private
injectEnvironmentVariable(string $name, mixed $value) : void
Parameters
-
$name
: string
-
-
$value
: mixed
-