ListCommandTest   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 8
c 1
b 0
f 0
dl 0
loc 15
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A test_it_list_files_and_directories() 0 7 1
A test_it_prints_nothing_when_no_files() 0 4 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