Completed
Push — master ( 63e97e...33e149 )
by Wachter
07:47
created

RunListenerTest::testRun()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 11
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 11
rs 9.4286
cc 1
eloc 6
nc 1
nop 0
1
<?php
2
3
namespace Unit\EventListener;
4
5
use Symfony\Component\EventDispatcher\Event;
6
use Task\SchedulerInterface;
7
use Task\TaskBundle\EventListener\RunListener;
8
9
class RunListenerTest extends \PHPUnit_Framework_TestCase
10
{
11
    public function testRun()
12
    {
13
        $event = $this->prophesize(Event::class);
14
        $scheduler = $this->prophesize(SchedulerInterface::class);
15
16
        $listener = new RunListener($scheduler->reveal());
17
18
        $listener->run($event->reveal());
19
20
        $scheduler->run()->shouldBeCalledTimes(1);
21
    }
22
}
23