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

LsTreeCommandTest::testTree()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
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