AccessDashboardTest   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
c 1
b 0
f 0
lcom 1
cbo 1
dl 0
loc 16
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A testProtectedDashboardRoute() 0 10 1
1
<?php
2
3
namespace App\Containers\Authentication\UI\WEB\Tests\Functional;
4
5
use App\Containers\Authentication\Tests\WebTestCase;
6
7
/**
8
 * Class AccessDashboardTest
9
 *
10
 * @author  Johan Alvarez <[email protected]>
11
 * @author  Mahmoud Zalt  <[email protected]>
12
 */
13
class AccessDashboardTest extends WebTestCase
14
{
15
16
    protected $endpoint = '/dashboard';
17
18
    public function testProtectedDashboardRoute()
19
    {
20
        // go to the protected page, without login
21
        $response = $this->get($this->endpoint);
22
23
        // should be redirected to login page
24
        $response->assertResponseStatus(302);
25
        $this->assertRedirectedTo('login');
26
        $this->see('login');
27
    }
28
}
29