Completed
Pull Request — master (#20)
by Wachter
02:27
created

RunListenerTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 3
dl 0
loc 14
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A testRun() 0 11 1
1
<?php
2
3
/*
4
 * This file is part of php-task library.
5
 *
6
 * (c) php-task
7
 *
8
 * This source file is subject to the MIT license that is bundled
9
 * with this source code in the file LICENSE.
10
 */
11
12
namespace Task\TaskBundle\Tests\Unit\EventListener;
13
14
use Symfony\Component\EventDispatcher\Event;
15
use Task\Runner\TaskRunnerInterface;
16
use Task\TaskBundle\EventListener\RunListener;
17
18
/**
19
 * Tests for class RunListener.
20
 */
21
class RunListenerTest extends \PHPUnit_Framework_TestCase
22
{
23
    public function testRun()
24
    {
25
        $event = $this->prophesize(Event::class);
26
        $taskRunner = $this->prophesize(TaskRunnerInterface::class);
27
28
        $listener = new RunListener($taskRunner->reveal());
29
30
        $listener->run($event->reveal());
31
32
        $taskRunner->runTasks()->shouldBeCalledTimes(1);
33
    }
34
}
35