Completed
Push — master ( ee0c27...00c4de )
by Kévin
03:01
created

FunctionalTest::testMultiController()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 10
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 10
rs 9.4285
cc 1
eloc 6
nc 1
nop 0
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
    public function testMultiController()
52
    {
53
        $client = static::createClient();
54
55
        $crawler = $client->request('GET', '/first');
56
        $this->assertSame('first', $crawler->text());
57
58
        $crawler = $client->request('GET', '/second');
59
        $this->assertSame('second', $crawler->text());
60
    }
61
}
62