Completed
Push — master ( 3664a9...ee0c27 )
by Kévin
02:43
created

FunctionalTest   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 34
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

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

4 Methods

Rating   Name   Duplication   Size   Complexity  
A testDummyAction() 0 7 1
A testSensioFrameworkExtraActionAction() 0 7 1
A testRouteAnnotationAction() 0 7 1
A testOverrideAction() 0 7 1
1
<?php
2
3
/*
4
 * (c) Kévin Dunglas <[email protected]>
5
 *
6
 * This source file is subject to the MIT license that is bundled
7
 * with this source code in the file LICENSE.
8
 */
9
10
namespace Dunglas\ActionBundle\Tests;
11
12
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
13
14
/**
15
 * @author Kévin Dunglas <[email protected]>
16
 */
17
class FunctionalTest extends WebTestCase
18
{
19
    public function testDummyAction()
20
    {
21
        $client = static::createClient();
22
23
        $crawler = $client->request('GET', '/');
24
        $this->assertSame('Here we are!', $crawler->text());
25
    }
26
27
    public function testSensioFrameworkExtraActionAction()
28
    {
29
        $client = static::createClient();
30
31
        $crawler = $client->request('GET', '/extra');
32
        $this->assertSame('How are you?', $crawler->text());
33
    }
34
35
    public function testRouteAnnotationAction()
36
    {
37
        $client = static::createClient();
38
39
        $crawler = $client->request('GET', '/annotation');
40
        $this->assertSame('Hey, ho, let\'s go!', $crawler->text());
41
    }
42
43
    public function testOverrideAction()
44
    {
45
        $client = static::createClient();
46
47
        $crawler = $client->request('GET', '/override');
48
        $this->assertSame('Override', $crawler->text());
49
    }
50
}
51