VisithorGoTest   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 44
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 4

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A setUp() 0 8 1
A testVisithorGo() 0 12 1
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