Completed
Push — master ( bc0965...67acc8 )
by Alexis
03:57
created

AppControllerTest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A testHome() 0 8 1
A createApplication() 0 4 1
1
<?php
2
3
namespace App\Controller;
4
5
use Silex\Application;
6
use Silex\WebTestCase;
7
8
class AppControllerTest extends WebTestCase
9
{
10
    public function testHome()
11
    {
12
        $client = $this->createClient();
13
        $client->request('GET', '/');
14
15
        $this->assertTrue($client->getResponse()->isOk());
16
        $this->assertContains('<h1 class="ui header">Home</h1>', $client->getResponse()->getContent());
17
    }
18
19
    /**
20
     * {@inheritdoc}
21
     */
22
    public function createApplication()
23
    {
24
        return require __DIR__ . '/../../app.php';
25
    }
26
}
27