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

DescriptorControllerTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 9
c 1
b 0
f 0
dl 0
loc 17
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A testGetDescriptor() 0 12 1
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