Completed
Push — master ( 2a89ae...63e97e )
by Wachter
08:08
created

HandlerRegistryTest   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 4

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
A setUp() 0 7 1
A testHas() 0 5 1
A testRun() 0 4 1
1
<?php
2
3
namespace Functional;
4
5
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
6
use Task\Handler\RegistryInterface;
7
8
class HandlerRegistryTest extends KernelTestCase
9
{
10
    /**
11
     * @var RegistryInterface
12
     */
13
    private $registry;
14
15
    protected function setUp()
16
    {
17
        parent::setUp();
18
19
        $this->bootKernel();
20
        $this->registry = self::$kernel->getContainer()->get('task.handler_registry');
21
    }
22
23
    public function testHas()
24
    {
25
        $this->assertTrue($this->registry->has('test'));
26
        $this->assertFalse($this->registry->has('test-1'));
27
    }
28
29
    public function testRun()
30
    {
31
        $this->assertEquals('daolkrow', $this->registry->run('test', 'workload'));
32
    }
33
}
34