VisithorGoTest::setUp()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 8
rs 9.4285
cc 1
eloc 6
nc 1
nop 0
1
<?php
2
3
/*
4
 * This file is part of the Visithor package.
5
 *
6
 * For the full copyright and license information, please view the LICENSE
7
 * file that was distributed with this source code.
8
 *
9
 * Feel free to edit as you please, and have fun.
10
 *
11
 * @author Marc Morera <[email protected]>
12
 */
13
14
namespace Visithor\Bundle\Tests\Functional;
15
16
use Symfony\Bundle\FrameworkBundle\Console\Application;
17
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
18
use Symfony\Component\Console\Input\ArrayInput;
19
use Symfony\Component\HttpKernel\Client;
20
21
/**
22
 * Class VisithorGoTest
23
 */
24
class VisithorGoTest extends WebTestCase
25
{
26
    /**
27
     * @var Client
28
     *
29
     * client
30
     */
31
    protected $client;
32
33
    /**
34
     * @var Application
35
     *
36
     * application
37
     */
38
    protected static $application;
39
40
    /**
41
     * Setup
42
     */
43
    public function setUp()
44
    {
45
        static::$kernel = static::createKernel();
46
        static::$kernel->boot();
47
        static::$application = new Application(static::$kernel);
48
        static::$application->setAutoExit(false);
49
        $this->client = static::createClient();
50
    }
51
52
    /**
53
     * Test visithor:go
54
     */
55
    public function testVisithorGo()
56
    {
57
        $result = static::$application->run(new ArrayInput([
58
            'command' => 'visithor:go',
59
            '--config' => static::$kernel->getRootDir(),
60
        ]));
61
62
        $this->assertEquals(
63
            0,
64
            $result
65
        );
66
    }
67
}
68