Test Failed
Pull Request — develop (#20)
by Denis
10:45 queued 02:02
created

testSearchProductsActionSuccess()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 11
Code Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 8
c 1
b 0
f 0
dl 0
loc 11
rs 10
cc 1
nc 1
nop 0
1
<?php
2
3
namespace App\Tests\Functional;
4
5
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
6
7
class ArtprimaPrometheusBundleTest extends WebTestCase
8
{
9
    public function testSearchProductsActionSuccess()
10
    {
11
        $client = static::createClient();
12
13
        $client->request('GET', '/metrics/prometheus');
14
        self::assertResponseIsSuccessful();
15
        $content = $client->getResponse()->getContent();
16
        $expected = "# HELP php_info Information about the PHP environment.\n# TYPE php_info gauge\nphp_info{version=\"%s\"} 1";
17
        self::assertContains(
18
            sprintf($expected, PHP_VERSION),
19
            trim($content)
20
        );
21
    }
22
}