ShortcutTest::setUp()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
namespace Robo;
3
4
use PHPUnit\Framework\TestCase;
5
use Robo\Traits\TestTasksTrait;
6
7
class ShortcutTest extends TestCase
8
{
9
    use TestTasksTrait;
10
    use Task\Filesystem\loadTasks;
11
    use Task\Filesystem\loadShortcuts;
12
13
    protected $fixtures;
14
15
    public function setUp()
16
    {
17
        $this->fixtures = new Fixtures();
18
        $this->initTestTasksTrait();
19
        $this->fixtures->createAndCdToSandbox();
20
    }
21
22
    public function tearDown()
23
    {
24
        $this->fixtures->cleanup();
25
    }
26
27 View Code Duplication
    public function testCopyDirShortcut()
0 ignored issues
show
Duplication introduced by
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
28
    {
29
        // copy dir with _copyDir shortcut
30
        $result = $this->_copyDir('box', 'bin');
31
        $this->assertTrue($result->wasSuccessful(), $result->getMessage());
32
        $this->assertFileExists('bin');
33
        $this->assertFileExists('bin/robo.txt');
34
    }
35
36 View Code Duplication
    public function testMirrorDirShortcut()
0 ignored issues
show
Duplication introduced by
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
37
    {
38
        // mirror dir with _mirrorDir shortcut
39
        $result = $this->_mirrorDir('box', 'bin');
40
        $this->assertTrue($result->wasSuccessful(), $result->getMessage());
41
        $this->assertFileExists('bin');
42
        $this->assertFileExists('bin/robo.txt');
43
    }
44
45
}
46