HelloHandlerTest::testHandle()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 10
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
cc 1
eloc 7
nc 1
nop 0
dl 0
loc 10
rs 10
c 1
b 0
f 1
1
<?php
2
declare(strict_types=1);
3
4
namespace JCIT\jobqueue\tests\unit\jobHandlers;
5
6
use Codeception\Test\Unit;
7
use JCIT\jobqueue\jobHandlers\HelloHandler;
8
use JCIT\jobqueue\jobs\HelloJob;
9
10
class HelloHandlerTest extends Unit
11
{
12
    public function testHandle()
13
    {
14
        $message = 'test';
15
        $job = new HelloJob($message);
16
17
        $handler = new HelloHandler();
18
        ob_start();
19
        $handler->handle($job);
20
        $output = ob_get_clean();
21
        $this->assertEquals('Hello ' . $message, $output);
22
    }
23
}
24