testIfContainsPostSyncEventMethodName()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 1 Features 0
Metric Value
c 1
b 1
f 0
dl 0
loc 7
rs 9.4285
cc 1
eloc 4
nc 1
nop 0
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