Passed
Push — master ( 352d85...486a88 )
by Pol
01:51
created

testItTestIfHeadersAreProperlySet()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 12
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 6
c 1
b 0
f 0
dl 0
loc 12
ccs 0
cts 7
cp 0
rs 10
cc 1
nc 1
nop 0
crap 2
1
<?php
2
3
/**
4
 * For the full copyright and license information, please view
5
 * the LICENSE file that was distributed with this source code.
6
 */
7
8
declare(strict_types=1);
9
10
namespace loophp\GoUnflocYourselfBundle\Tests\Functional;
11
12
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
13
14
/**
15
 * @internal
16
 * @coversNothing
17
 */
18
final class FooControllerTest extends WebTestCase
19
{
20
    public function testItTestIfHeadersAreProperlySet(): void
21
    {
22
        $client = self::createClient();
23
24
        $crawler = $client->request('GET', '/');
0 ignored issues
show
Unused Code introduced by
The assignment to $crawler is dead and can be removed.
Loading history...
25
26
        $this->assertResponseIsSuccessful();
27
        $this->assertResponseHeaderSame('Permissions-Policy', 'interest-cohort=()');
28
29
        $crawler = $client->request('GET', '/', [], [], [], json_encode(['Permissions-Policy' => 'foo']));
30
31
        $this->assertResponseHeaderSame('Permissions-Policy', 'foo');
32
    }
33
}
34