ResetCommandTest::setUp()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 8
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
/**
4
 * Created by PhpStorm.
5
 * User: christian
6
 * Date: 3/2/16
7
 * Time: 1:11 PM
8
 */
9
10
namespace GitElephant\Command;
11
12
use GitElephant\TestCase;
13
14
class ResetCommandTest extends TestCase
15
{
16
    /**
17
     * setUp
18
     */
19
    public function setUp(): void
20
    {
21
        $this->initRepository();
22
        $this->getRepository()->init();
23
        $this->addFile('test');
24
        $this->getRepository()->commit('test', true);
25
        $this->getRepository()->createBranch('test', 'master');
26
    }
27
28
    public function testResetHard(): void
29
    {
30
        $rstc = ResetCommand::getInstance();
31
        $this->assertEquals("reset '--hard' 'dbeac'", $rstc->reset('dbeac', [ResetCommand::OPTION_HARD]));
32
    }
33
}
34