|
8 | 8 | use OpenTelemetry\SDK\Metrics\Aggregation\ExplicitBucketHistogramAggregation; |
9 | 9 | use OpenTelemetry\SDK\Metrics\Aggregation\LastValueAggregation; |
10 | 10 | use OpenTelemetry\SDK\Metrics\Aggregation\SumAggregation; |
| 11 | +use OpenTelemetry\SDK\Metrics\AggregationTemporalitySelectorInterface; |
11 | 12 | use OpenTelemetry\SDK\Metrics\Data\DataInterface; |
12 | 13 | use OpenTelemetry\SDK\Metrics\Data\Metric; |
13 | 14 | use OpenTelemetry\SDK\Metrics\Data\Temporality; |
@@ -78,7 +79,6 @@ public function test_add_creates_metric_source_with_exporter_temporality(): void |
78 | 79 | public function test_add_does_not_create_metric_source_if_exporter_temporality_null(): void |
79 | 80 | { |
80 | 81 | $exporter = $this->createMock(MetricExporterInterface::class); |
81 | | - $exporter->method('temporality')->willReturn(null); |
82 | 82 | $reader = new ExportingReader($exporter); |
83 | 83 |
|
84 | 84 | $provider = $this->createMock(MetricSourceProviderInterface::class); |
@@ -168,7 +168,7 @@ public function test_shutdown_does_not_export_empty_metrics(): void |
168 | 168 |
|
169 | 169 | public function test_shutdown_exports_metrics(): void |
170 | 170 | { |
171 | | - $exporter = $this->createMock(MetricExporterInterface::class); |
| 171 | + $exporter = $this->createMock(MetricExporterWithTemporalityInterface::class); |
172 | 172 | $provider = $this->createMock(MetricSourceProviderInterface::class); |
173 | 173 | $source = $this->createMock(MetricSourceInterface::class); |
174 | 174 | $source->method('collect')->willReturn($this->createMock(Metric::class)); |
@@ -224,3 +224,7 @@ public function test_closed_reader_does_not_call_exporter_methods(): void |
224 | 224 | interface DefaultAggregationProviderExporterInterface extends MetricExporterInterface, DefaultAggregationProviderInterface |
225 | 225 | { |
226 | 226 | } |
| 227 | + |
| 228 | +interface MetricExporterWithTemporalityInterface extends MetricExporterInterface, AggregationTemporalitySelectorInterface |
| 229 | +{ |
| 230 | +} |
0 commit comments