GeneralApiTest::testIndexHttp200()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 0
1
<?php
2
namespace Flatdown\Tests;
3
4
class GeneralApiTest extends BaseTestCase
5
{
6
    public function testRootHttp302()
7
    {
8
        $response = $this->call($this->createRequest('GET', '/'));
9
10
        $this->assertEquals(302, $response->getStatusCode());
11
        $this->assertTrue($response->hasHeader('Location'));
12
    }
13
14
    public function testIndexHttp200()
15
    {
16
        $response = $this->call($this->createRequest('GET', '/_index'));
17
18
        $this->assertEquals(200, $response->getStatusCode());
19
    }
20
21
    public function testIndexWithSlashHttp301()
22
    {
23
        $response = $this->call($this->createRequest('GET', '/_index/'));
24
25
        $this->assertEquals(301, $response->getStatusCode());
26
    }
27
28
    public function testDemoHttp200()
29
    {
30
        $response = $this->call($this->createRequest('GET', '/demo'));
31
32
        $this->assertEquals(200, $response->getStatusCode());
33
    }
34
35
    public function testHttp404()
36
    {
37
        $response = $this->call($this->createRequest('GET', '/foobar'));
38
39
        $this->assertEquals(404, $response->getStatusCode());
40
    }
41
}
42