Passed
Push — master ( 7bee4d...457c92 )
by Sebastian
01:54
created

PostMergeTest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 2
eloc 13
dl 0
loc 28
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A testExecute() 0 23 2
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 CaptainHook\App\Console\Command\Hook;
11
12
use CaptainHook\App\Console\IO\NullIO;
13
use CaptainHook\App\Git\DummyRepo;
14
use Symfony\Component\Console\Input\ArrayInput;
15
use Symfony\Component\Console\Tests\Fixtures\DummyOutput;
16
use PHPUnit\Framework\TestCase;
17
18
class PostMergeTest extends TestCase
19
{
20
    /**
21
     * Tests PostMerge::run
22
     */
23
    public function testExecute(): void
24
    {
25
        if (\defined('PHP_WINDOWS_VERSION_MAJOR')) {
26
            $this->markTestSkipped('not tested on windows');
27
        }
28
29
        $repo = new DummyRepo();
30
        $repo->setup();
31
32
        $cmd    = new PostMerge(CH_PATH_FILES . '/config/empty.json', $repo->getPath());
33
        $output = new DummyOutput();
34
        $input  = new ArrayInput(
35
            [
36
                'squash' => 0
37
            ]
38
        );
39
40
        $cmd->setIO(new NullIO());
41
        $cmd->run($input, $output);
42
43
        $repo->cleanup();
44
45
        $this->assertTrue(true);
46
    }
47
}
48