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

MetricsControllerTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 1
eloc 7
dl 0
loc 10
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Tests\Artprima\PrometheusMetricsBundle\Controller;
4
5
use Artprima\PrometheusMetricsBundle\Controller\MetricsController;
6
use Artprima\PrometheusMetricsBundle\Metrics\Renderer;
7
use PHPUnit\Framework\TestCase;
8
use Symfony\Component\HttpFoundation\Response;
9
10
class MetricsControllerTest extends TestCase
11
{
12
    public function testPrometheus()
13
    {
14
        $response = new Response();
15
        $renderer = $this->createMock(Renderer::class);
16
        $renderer->expects(self::once())->method('renderResponse')->willReturn($response);
17
        $controller = new MetricsController($renderer);
18
        $result = $controller->prometheus();
19
        $this->assertSame($response, $result);
20
    }
21
}
22