RatioParserTest
extends TestCase
-
#[CoversClass]
-
\OpenTelemetry\SDK\Common\Configuration\Parser\RatioParser::class
Table of Contents
Constants
-
NON_NUMERIC_VALUES
= ['string' => ['foo'], 'bool' => ['true']]
-
OUT_OF_RANGE_VALUES
= ['too low' => ['-0.1'], 'too high' => ['1.1']]
-
RATIO_VALUES
= ['min ' => ['0'], 'max ' => ['1'], 'mid ' => ['0.5']]
Methods
-
nonNumericValueProvider()
: array<string|int, mixed>
-
outOfRangeValueProvider()
: array<string|int, mixed>
-
ratioValueProvider()
: array<string|int, mixed>
-
test_non_numeric_values_throw_exception()
: void
-
test_out_of_range_values_throw_exception()
: void
-
test_ratio_values_return_float()
: void
NON_NUMERIC_VALUES
private
mixed
NON_NUMERIC_VALUES
= ['string' => ['foo'], 'bool' => ['true']]
OUT_OF_RANGE_VALUES
private
mixed
OUT_OF_RANGE_VALUES
= ['too low' => ['-0.1'], 'too high' => ['1.1']]
RATIO_VALUES
private
mixed
RATIO_VALUES
= ['min ' => ['0'], 'max ' => ['1'], 'mid ' => ['0.5']]
nonNumericValueProvider()
public
static nonNumericValueProvider() : array<string|int, mixed>
Return values
array<string|int, mixed>
outOfRangeValueProvider()
public
static outOfRangeValueProvider() : array<string|int, mixed>
Return values
array<string|int, mixed>
ratioValueProvider()
public
static ratioValueProvider() : array<string|int, mixed>
Return values
array<string|int, mixed>
test_non_numeric_values_throw_exception()
public
test_non_numeric_values_throw_exception(string $value) : void
Parameters
-
$value
: string
-
-
#[DataProvider]
-
'nonNumericValueProvider'
test_out_of_range_values_throw_exception()
public
test_out_of_range_values_throw_exception(string $value) : void
Parameters
-
$value
: string
-
-
#[DataProvider]
-
'outOfRangeValueProvider'
test_ratio_values_return_float()
public
test_ratio_values_return_float(string $value) : void
Parameters
-
$value
: string
-
-
#[DataProvider]
-
'ratioValueProvider'