Completed
Push — master ( f1e1ae...7e3292 )
by Denis
10:20 queued 02:02
created

MetricsGeneratorsRegistryTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 1
eloc 7
dl 0
loc 12
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Tests\Artprima\PrometheusMetricsBundle\Metrics;
4
5
use Artprima\PrometheusMetricsBundle\Metrics\MetricsGeneratorInterface;
6
use Artprima\PrometheusMetricsBundle\Metrics\MetricsGeneratorRegistry;
7
use PHPUnit\Framework\TestCase;
8
9
class MetricsGeneratorsRegistryTest extends TestCase
10
{
11
    public function testRegisterAndGetMetricsGenerators()
12
    {
13
        $generator1 = $this->createMock(MetricsGeneratorInterface::class);
14
        $generator2 = $this->createMock(MetricsGeneratorInterface::class);
15
16
        $registry = new MetricsGeneratorRegistry();
17
        $registry->registerMetricsGenerator($generator1);
18
        $registry->registerMetricsGenerator($generator2);
19
20
        $this->assertEquals([$generator1, $generator2], $registry->getMetricsGenerators());
21
    }
22
}
23