DefaultControllerTest::testCopyright()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 9
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 9
rs 9.6666
cc 1
eloc 5
nc 1
nop 0
1
<?php
2
3
namespace Tests\AppBundle\Controller;
4
5
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
6
7
class DefaultControllerTest extends WebTestCase
8
{
9
    public function testIndex()
10
    {
11
        $client = static::createClient();
12
13
        $crawler = $client->request('GET', '/');
14
15
        $this->assertEquals(200, $client->getResponse()->getStatusCode());
16
        $this->assertContains('Welcome to Symfony.si', $crawler->filter('h1')->text());
17
    }
18
19
    public function testContact()
20
    {
21
        $client = static::createClient();
22
23
        $crawler = $client->request('GET', '/contact');
24
25
        $this->assertEquals(200, $client->getResponse()->getStatusCode());
26
        $this->assertContains('Contact', $crawler->filter('h1')->text());
27
    }
28
29
    public function testCopyright()
30
    {
31
        $client = static::createClient();
32
33
        $crawler = $client->request('GET', '/copyrights');
34
35
        $this->assertEquals(200, $client->getResponse()->getStatusCode());
36
        $this->assertContains('Copyrights', $crawler->filter('h1')->text());
37
    }
38
39
    public function testContributors()
40
    {
41
        $client = static::createClient();
42
43
        $crawler = $client->request('GET', '/contributors');
44
45
        $this->assertEquals(200, $client->getResponse()->getStatusCode());
46
        $this->assertContains('Symfony.si contributors', $crawler->filter('h1')->text());
47
    }
48
}
49