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

FooControllerTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 1
eloc 7
dl 0
loc 14
ccs 0
cts 7
cp 0
rs 10
c 0
b 0
f 0

1 Method

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