Completed
Pull Request — master (#139)
by
unknown
02:03
created

ResetCommandTest   A

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
 * Created by PhpStorm.
4
 * User: christian
5
 * Date: 3/2/16
6
 * Time: 1:11 PM
7
 */
8
9
namespace GitElephant\Command;
10
11
use GitElephant\Objects\Commit;
12
use \GitElephant\TestCase;
13
14
class ResetCommandTest extends TestCase
15
{
16
    /**
17
     * setUp
18
     */
19
    public function setUp()
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()
29
    {
30
        $rstc = ResetCommand::getInstance();
31
        $this->assertEquals("reset '--hard' 'dbeac'",$rstc->reset('dbeac',array(ResetCommand::OPTION_HARD)));
32
    }
33
}
34