IndexTest   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 7
dl 0
loc 15
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A testAuthenticationIsNeeded() 0 3 1
A testRedirectToSettingsActionWhenTheAnalyticsModuleIsNotConfigured() 0 8 1
1
<?php
2
3
namespace Backend\Modules\Analytics\Tests\Action;
4
5
use Backend\Core\Tests\BackendWebTestCase;
6
use Symfony\Bundle\FrameworkBundle\Client;
7
8
class IndexTest extends BackendWebTestCase
9
{
10
    public function testAuthenticationIsNeeded(Client $client): void
11
    {
12
        self::assertAuthenticationIsNeeded($client, '/private/en/analytics/index');
13
    }
14
15
    public function testRedirectToSettingsActionWhenTheAnalyticsModuleIsNotConfigured(Client $client): void
16
    {
17
        $this->login($client);
18
19
        self::assertGetsRedirected(
20
            $client,
21
            '/private/en/analytics/index',
22
            '/private/en/analytics/settings'
23
        );
24
    }
25
}
26