Completed
Pull Request — master (#166)
by
unknown
112:06 queued 110:39
created

LsTreeCommandTest   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 45
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

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

4 Methods

Rating   Name   Duplication   Size   Complexity  
A setUp() 0 4 1
A testFullTree() 0 4 1
A testTree() 0 4 1
A testListAll() 0 4 1
1
<?php
2
3
/**
4
 * This file is part of the GitElephant package.
5
 *
6
 * (c) Matteo Giachino <[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
 * Just for fun...
12
 */
13
14
namespace GitElephant\Command;
15
16
use GitElephant\TestCase;
17
18
/**
19
 * LsTreeCommandTest
20
 *
21
 * LsTreeCommand class tests
22
 *
23
 * @author Matteo Giachino <[email protected]>
24
 */
25
class LsTreeCommandTest extends TestCase
26
{
27
    /**
28
     * @var \GitElephant\Command\LsTreeCommand
29
     */
30
    private $lsTreeCommand;
31
32
    /**
33
     * setUp function
34
     */
35
    public function setUp(): void
36
    {
37
        $this->lsTreeCommand = new LsTreeCommand();
38
    }
39
40
    /**
41
     * fullTree test
42
     *
43
     * @covers \GitElephant\Command\LsTreeCommand::tree
44
     */
45
    public function testFullTree(): void
46
    {
47
        $this->assertEquals("ls-tree '-r' '-t' '-l' 'HEAD'", $this->lsTreeCommand->fullTree(), 'ls-tree command test');
48
    }
49
50
    /**
51
     * tree test
52
     *
53
     * @covers \GitElephant\Command\LsTreeCommand::tree
54
     */
55
    public function testTree(): void
56
    {
57
        $this->assertEquals("ls-tree '-l' 'HEAD'", $this->lsTreeCommand->tree(), 'ls-tree command test');
58
    }
59
60
    /**
61
     * listAll test
62
     *
63
     * @covers \GitElephant\Command\LsTreeCommand::listAll
64
     */
65
    public function testListAll(): void
66
    {
67
        $this->assertEquals("ls-tree 'HEAD'", $this->lsTreeCommand->listAll(), 'ls-tree command test');
68
    }
69
}
70