ResetCommandTest   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 3

Importance

Changes 0
Metric Value
wmc 2
lcom 1
cbo 3
dl 0
loc 20
rs 10
c 0
b 0
f 0

2 Methods

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