OpenTelemetry PHP

EnvironmentResolverTest extends TestCase
in package
uses TestState

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

Constants

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']]

Properties

$environmentVariables

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

Methods

rawValueProvider()

public static rawValueProvider() : array<string|int, mixed>
Return values
array<string|int, mixed>

test_retrieve_value()

public test_retrieve_value(string $varName, string $varValue) : void
Parameters
$varName : string
$varValue : string
Attributes
#[DataProvider]
'rawValueProvider'

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]

injectEnvironmentVariable()

private injectEnvironmentVariable(string $name, mixed $value) : void
Parameters
$name : string
$value : mixed

        
On this page

Search results