Test Failed
Pull Request — master (#52)
by Matthieu
04:37
created

DescriptorControllerTest::testGetDescriptor()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 12
Code Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 8
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 12
rs 10
1
<?php declare(strict_types = 1);
2
3
namespace AtlassianConnectBundle\Tests\Functional;
4
5
/**
6
 * class DescriptorControllerTest
7
 */
8
final class DescriptorControllerTest extends AbstractWebTestCase
9
{
10
    /**
11
     * test if the descriptor matches the config
12
     */
13
    public function testGetDescriptor(): void
14
    {
15
        $client = self::createClient(['environment' => 'prod']);
16
        $client->request('GET', '/atlassian-connect.json');
17
18
        $this->assertResponseIsSuccessful();
19
20
        $descriptor = \json_decode($client->getResponse()->getContent(), true);
21
        $config = self::getParentContainer()->getParameter('atlassian_connect');
22
        $this->assertSame(
23
            $config['prod'],
24
            $descriptor
25
        );
26
    }
27
}
28