ExecutorRunnerTest   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
A testIfAllEventsAreReturned() 0 11 1
A testIfContainsPostSyncEventMethodName() 0 7 1
A testIfContainsPostSyncEventName() 0 7 1
1
<?php
2
3
namespace Velikonja\LabbyBundle\Test\Executor;
4
5
use Velikonja\LabbyBundle\Events;
6
use Velikonja\LabbyBundle\Executor\ExecutorRunner;
7
8
class ExecutorRunnerTest extends \PHPUnit_Framework_TestCase
9
{
10
    public function testIfAllEventsAreReturned()
11
    {
12
        $runner    = new ExecutorRunner(array());
13
        $events    = $runner->getSubscribedEvents();
14
        $allEvents = Events::all();
15
16
        $this->assertEquals(
17
            count($allEvents),
18
            count($events)
19
        );
20
    }
21
22
    public function testIfContainsPostSyncEventMethodName()
23
    {
24
        $runner = new ExecutorRunner(array());
25
        $events = $runner->getSubscribedEvents();
26
27
        $this->assertContains(Events::POST_SYNC, $events);
28
    }
29
30
    public function testIfContainsPostSyncEventName()
31
    {
32
        $runner = new ExecutorRunner(array());
33
        $events = $runner->getSubscribedEvents();
34
35
        $this->assertArrayHasKey(Events::POST_SYNC, $events);
36
    }
37
}
38