Passed
Push — dev ( 4bea9d...fc80c1 )
by Mattia
05:53
created

WebsiteControllerTest   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Importance

Changes 2
Bugs 0 Features 2
Metric Value
eloc 7
c 2
b 0
f 2
dl 0
loc 21
rs 10
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A shouldDisplay404ForUnExistentUser() 0 4 1
A shouldDisplayHomePage() 0 4 1
A shouldDisplayUserInfoPage() 0 4 1
1
<?php
2
3
declare(strict_types=1);
4
5
/**
6
 * Class WebsiteControllerTest.
7
 */
8
class WebsiteControllerTest extends TestCase
9
{
10
    /** @test */
11
    public function shouldDisplayHomePage(): void
12
    {
13
        $response = $this->get('/');
14
        $response->assertResponseStatus(200);
15
    }
16
17
    /** @test */
18
    public function shouldDisplayUserInfoPage(): void
19
    {
20
        $response = $this->get('/user/_Cyb3r');
21
        $response->assertResponseStatus(200);
22
    }
23
24
    /** @test */
25
    public function shouldDisplay404ForUnExistentUser(): void
26
    {
27
        $response = $this->get('/user/IHopeThisUserDoesNotExists');
28
        $response->assertResponseStatus(404);
29
    }
30
}
31