Completed
Push — master ( dd8846...82fafa )
by Amine
03:04
created

ListCommandTest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A test_it_list_files_and_directories() 0 8 1
A test_it_prints_nothing_when_no_files() 0 5 1
1
<?php namespace Tarsana\Command\Examples\Tests;
2
3
use Tarsana\Command\Examples\ListCommand;
4
use Tarsana\Tester\CommandTestCase;
5
6
7
class ListCommandTest extends CommandTestCase {
8
9
    public function test_it_list_files_and_directories()
10
    {
11
        $this->havingFile('demo.txt', 'Some text here!')
12
             ->havingFile('doc.pdf')
13
             ->havingDir('src')
14
             ->command(new ListCommand)
15
             ->printsExactly('demo.txt<br>doc.pdf<br>src<br>');
16
    }
17
18
    public function test_it_prints_nothing_when_no_files()
19
    {
20
        $this->command(new ListCommand)
21
             ->printsExactly('');
22
    }
23
24
}
25