GeneralApiTest   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

Changes 0
Metric Value
wmc 3
lcom 1
cbo 2
dl 0
loc 27
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A testIndexHttp200() 0 10 1
A testIndexWithSlashHttp301() 0 6 1
A testHttp404() 0 6 1
1
<?php
2
3
namespace App\Tests;
4
5
class GeneralApiTest extends BaseTestCase
6
{
7
    public function testIndexHttp200()
8
    {
9
        $response = $this->call($this->createRequest('GET', '/'));
10
11
        $this->assertEquals(200, $response->getStatusCode());
12
13
        $response = $this->call($this->createRequest('GET', '/about'));
14
15
        $this->assertEquals(200, $response->getStatusCode());
16
    }
17
18
    public function testIndexWithSlashHttp301()
19
    {
20
        $response = $this->call($this->createRequest('GET', '/about/'));
21
22
        $this->assertEquals(301, $response->getStatusCode());
23
    }
24
25
    public function testHttp404()
26
    {
27
        $response = $this->call($this->createRequest('GET', '/foobar'));
28
29
        $this->assertEquals(404, $response->getStatusCode());
30
    }
31
}
32