Skip to content

Commit eec8db2

Browse files
committed
test: add storage stubs
1 parent 1ef4868 commit eec8db2

File tree

4 files changed

+96
-0
lines changed

4 files changed

+96
-0
lines changed

tests/Stubs/CounterStorageStub.php

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
namespace Zlodes\PrometheusClient\Tests\Stubs;
6+
7+
use Zlodes\PrometheusClient\Storage\Commands\IncrementCounter;
8+
use Zlodes\PrometheusClient\Storage\Contracts\CounterStorage;
9+
10+
final class CounterStorageStub implements CounterStorage
11+
{
12+
public function incrementCounter(IncrementCounter $command): void
13+
{
14+
}
15+
16+
public function fetchCounters(): iterable
17+
{
18+
return [];
19+
}
20+
21+
public function clearCounters(): void
22+
{
23+
}
24+
}

tests/Stubs/GaugeStorageStub.php

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
namespace Zlodes\PrometheusClient\Tests\Stubs;
6+
7+
use Zlodes\PrometheusClient\Storage\Commands\UpdateGauge;
8+
use Zlodes\PrometheusClient\Storage\Contracts\GaugeStorage;
9+
10+
final class GaugeStorageStub implements GaugeStorage
11+
{
12+
public function updateGauge(UpdateGauge $command): void
13+
{
14+
}
15+
16+
public function fetchGauges(): iterable
17+
{
18+
return [];
19+
}
20+
21+
public function clearGauges(): void
22+
{
23+
}
24+
}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
namespace Zlodes\PrometheusClient\Tests\Stubs;
6+
7+
use Zlodes\PrometheusClient\Storage\Commands\UpdateHistogram;
8+
use Zlodes\PrometheusClient\Storage\Contracts\HistogramStorage;
9+
10+
final class HistogramStorageStub implements HistogramStorage
11+
{
12+
public function updateHistogram(UpdateHistogram $command): void
13+
{
14+
}
15+
16+
public function fetchHistograms(): iterable
17+
{
18+
return [];
19+
}
20+
21+
public function clearHistograms(): void
22+
{
23+
}
24+
}

tests/Stubs/SummaryStorageStub.php

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
namespace Zlodes\PrometheusClient\Tests\Stubs;
6+
7+
use Zlodes\PrometheusClient\Storage\Commands\UpdateSummary;
8+
use Zlodes\PrometheusClient\Storage\Contracts\SummaryStorage;
9+
10+
final class SummaryStorageStub implements SummaryStorage
11+
{
12+
public function updateSummary(UpdateSummary $command): void
13+
{
14+
}
15+
16+
public function fetchSummaries(): iterable
17+
{
18+
return [];
19+
}
20+
21+
public function clearSummaries(): void
22+
{
23+
}
24+
}

0 commit comments

Comments
 (0)