yield 'empty from and to' =>
[null, 10, '*-10'
];
yield 'from and empty to' =>
[10, null, '10-*'
];
} /**
* @dataProvider buildRangeKeyDataProvider
*/
public function testBuildRangeKey(?float
$from, ?float
$to, string
$expectedKey): void
{ $method = ReflectionHelper::
getMethod(RangeAggregation::
class, 'buildRangeKey'
);
$aggregation =
new RangeAggregation('test', 'test',
[]);
static::
assertEquals($expectedKey,
$method->
invoke($aggregation,
$from,
$to));
} /**
* @return array<string, array{rangesDefinition: mixed, rangesExpectedResult: mixed}>
*/
public static function rangeAggregationDataProvider(): iterable
{ yield 'default ranges test cases' =>
[ 'rangesDefinition' =>
[ [],