CommandTest   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 4

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A testCommand() 0 13 1
1
<?php
2
3
namespace Hairmare\Dodat;
4
5
use Symfony\Component\Console\Tester\CommandTester;
6
use Hairmare\Dodat\Load;
7
8
class CommandTest extends \PHPUnit_Framework_TestCase
9
{
10
    public function testCommand()
11
    {
12
        $runMock = $this->getMock('\Hairmare\Dodat\Run');
13
        $runMock->expects($this->once())->method('setScripts');
14
        $runMock->expects($this->once())->method('run');
15
16
        $load = new Load(file_get_contents(__DIR__.'/../.travis.yml'));
17
18
        $command = new Command($runMock, $load);
19
        $tester = new CommandTester($command);
20
21
        $tester->execute(array());
22
    }
23
}
24