Completed
Push — master ( c2e487...7ac6a5 )
by Wachter
07:39
created

RunCommandTest::testRun()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 12
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 12
rs 9.4286
cc 1
eloc 7
nc 1
nop 0
1
<?php
2
3
namespace Unit\Command;
4
5
use Symfony\Component\Console\Input\InputInterface;
6
use Symfony\Component\Console\Output\OutputInterface;
7
use Task\SchedulerInterface;
8
use Task\TaskBundle\Command\RunCommand;
9
10
class RunCommandTest extends \PHPUnit_Framework_TestCase
11
{
12
    public function testConfigure()
13
    {
14
        $scheduler = $this->prophesize(SchedulerInterface::class);
15
        $command = new RunCommand($scheduler->reveal());
16
17
        $this->assertEquals('task:run', $command->getName());
18
    }
19
20
    public function testRun()
21
    {
22
        $input = $this->prophesize(InputInterface::class);
23
        $output = $this->prophesize(OutputInterface::class);
24
25
        $scheduler = $this->prophesize(SchedulerInterface::class);
26
        $command = new RunCommand($scheduler->reveal());
27
28
        $command->run($input->reveal(), $output->reveal());
29
30
        $scheduler->run()->shouldBeCalledTimes(1);
31
    }
32
}
33