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

HandlerRegistryTest::testHas()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

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