Skip to content

Commit

Permalink
IBX-6827: Allow to add label aggregation ranges (unit tests)
Browse files Browse the repository at this point in the history
  • Loading branch information
adamwojs committed Dec 8, 2023
1 parent 008045c commit a23236b
Showing 1 changed file with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,11 @@ public function dataProviderForTestExtract(): iterable
{
$aggregation = $this->createMock(AbstractRangeAggregation::class);
$aggregation->method('getName')->willReturn(self::EXAMPLE_AGGREGATION_NAME);
$aggregation->method('getRanges')->willReturn([
new Range(Range::INF, 10, 'a'),
new Range(10, 100, 'b'),
new Range(100, Range::INF, 'c'),
]);

yield 'default' => [
$aggregation,
Expand All @@ -78,9 +83,9 @@ public function dataProviderForTestExtract(): iterable
new RangeAggregationResult(
self::EXAMPLE_AGGREGATION_NAME,
[
new RangeAggregationResultEntry(new Range(null, '10'), 10),
new RangeAggregationResultEntry(new Range('10', '100'), 100),
new RangeAggregationResultEntry(new Range('100', null), 1000),
new RangeAggregationResultEntry(new Range(Range::INF, '10', 'a'), 10),
new RangeAggregationResultEntry(new Range('10', '100', 'b'), 100),
new RangeAggregationResultEntry(new Range('100', Range::INF, 'c'), 1000),
]
),
];
Expand Down

0 comments on commit a23236b

Please sign in to comment.