Passed
Push — master ( 21c505...12ca40 )
by Sebastian
02:34
created

RunTest::testExecute()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 15
Code Lines 9

Duplication

Lines 15
Ratio 100 %

Importance

Changes 0
Metric Value
dl 15
loc 15
c 0
b 0
f 0
rs 9.4285
cc 1
eloc 9
nc 1
nop 0
1
<?php
2
/**
3
 * This file is part of CaptainHook.
4
 *
5
 * (c) Sebastian Feldmann <[email protected]>
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 */
10
namespace sebastianfeldmann\CaptainHook\Console\Command;
11
12
use sebastianfeldmann\CaptainHook\Console\IO\NullIO;
13
use sebastianfeldmann\CaptainHook\Git\DummyRepo;
14
use Symfony\Component\Console\Input\ArrayInput;
15
use Symfony\Component\Console\Tests\Fixtures\DummyOutput;
16
17
class RunTest extends \PHPUnit_Framework_TestCase
18
{
19
    /**
20
     * Tests Run::run
21
     */
22
    public function testExecute()
23
    {
24
        $run    = new Run();
25
        $output = new DummyOutput();
26
        $input  = new ArrayInput(
27
            [
28
                'hook'            => 'pre-push',
29
                '--configuration' => HMU_PATH_FILES . '/config/valid.json',
30
                '--message'       => HMU_PATH_FILES . '/git/message/valid.txt'
31
            ]
32
        );
33
34
        $run->setIO(new NullIO());
35
        $run->run($input, $output);
36
    }
37
}
38