PrePushTest   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 11
dl 0
loc 19
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A testExecute() 0 17 1
1
<?php
2
3
/**
4
 * This file is part of CaptainHook
5
 *
6
 * (c) Sebastian Feldmann <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace CaptainHook\App\Console\Command\Hook;
13
14
use CaptainHook\App\Console\Runtime\Resolver;
15
use CaptainHook\App\Git\DummyRepo;
16
use Symfony\Component\Console\Input\ArrayInput;
17
use Symfony\Component\Console\Output\NullOutput;
18
use PHPUnit\Framework\TestCase;
19
20
class PrePushTest extends TestCase
21
{
22
    public function testExecute(): void
23
    {
24
        $repo   = new DummyRepo();
25
        $output = new NullOutput();
26
        $input  = new ArrayInput(
27
            [
28
                '--configuration' => CH_PATH_FILES . '/config/valid.json',
29
                '--git-directory' => $repo->getGitDir(),
30
                'target'          => 'master',
31
                'url'             => 'origin'
32
            ]
33
        );
34
35
        $cmd = new PrePush(new Resolver());
36
        $cmd->run($input, $output);
37
38
        $this->assertTrue(true);
39
    }
40
}
41